/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2008-09-08 12:03:16 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080908120316-rrt6r0a5yezc3q1d
* INSTALL: New file.

* mandos-keygen: Use "/etc/mandos/keys" if "/etc/keys/mandos" does not
                 exist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
# DocBook-to-man post-processing to fix a '\n' escape bug
56
56
MANPOST=sed --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
57
57
 
58
 
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
59
 
        plugins.d/usplash plugins.d/splashy
 
58
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client
60
59
PROGS=plugin-runner $(PLUGINS)
61
60
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
62
61
        plugins.d/mandos-client.8mandos \
139
138
# Add a client password
140
139
        ./mandos-keygen --dir keydir --password >> $@
141
140
 
142
 
install: install-server install-client-nokey
 
141
install: install-server install-client
143
142
 
144
143
install-server: doc
145
 
        install --directory $(CONFDIR)
 
144
        install --directory $(CONFDIR) $(MANDIR)/man5 \
 
145
                $(MANDIR)/man8
146
146
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
147
147
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
148
148
                mandos.conf
152
152
                $(DESTDIR)/etc/init.d/mandos
153
153
        install --mode=u=rw,go=r default-mandos \
154
154
                $(DESTDIR)/etc/default/mandos
155
 
        if [ -z $(DESTDIR) ]; then \
156
 
                update-rc.d mandos defaults 25 15;\
157
 
        fi
 
155
        update-rc.d mandos defaults
158
156
        gzip --best --to-stdout mandos.8 \
159
157
                > $(MANDIR)/man8/mandos.8.gz
160
158
        gzip --best --to-stdout mandos.conf.5 \
162
160
        gzip --best --to-stdout mandos-clients.conf.5 \
163
161
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
164
162
 
165
 
install-client-nokey: all doc
166
 
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
167
 
        install --directory --mode=u=rwx $(KEYDIR) \
 
163
install-client: all doc $(INITRAMFSTOOLS)/hooks/.
 
164
        install --directory $(PREFIX)/lib/mandos $(CONFDIR) \
 
165
                $(MANDIR)/man8
 
166
        install --directory --mode=u=rwx $(KEYDIR)
 
167
        install --directory --mode=u=rwx \
168
168
                $(PREFIX)/lib/mandos/plugins.d
169
169
        if [ "$(CONFDIR)" != "$(PREFIX)/lib/mandos" ]; then \
170
170
                install --mode=u=rwx \
171
171
                        --directory "$(CONFDIR)/plugins.d"; \
 
172
                install --mode=u=rw,go=r etc-plugins.d-README \
 
173
                        $(CONFDIR)/plugins.d/README ; \
172
174
        fi
173
175
        install --mode=u=rwx,go=rx \
174
176
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
180
182
        install --mode=u=rwxs,go=rx \
181
183
                --target-directory=$(PREFIX)/lib/mandos/plugins.d \
182
184
                plugins.d/mandos-client
183
 
        install --mode=u=rwxs,go=rx \
 
185
        install --mode=u=rwx,go=rx \
184
186
                --target-directory=$(PREFIX)/lib/mandos/plugins.d \
185
187
                plugins.d/usplash
186
 
        install --mode=u=rwxs,go=rx \
187
 
                --target-directory=$(PREFIX)/lib/mandos/plugins.d \
188
 
                plugins.d/splashy
189
188
        install initramfs-tools-hook \
190
189
                $(INITRAMFSTOOLS)/hooks/mandos
191
 
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
 
190
        install initramfs-tools-hook-conf \
192
191
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
193
192
        install initramfs-tools-script \
194
193
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
201
200
                > $(MANDIR)/man8/password-prompt.8mandos.gz
202
201
        gzip --best --to-stdout plugins.d/mandos-client.8mandos \
203
202
                > $(MANDIR)/man8/mandos-client.8mandos.gz
204
 
 
205
 
install-client: install-client-nokey
206
203
# Post-installation stuff
207
204
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
208
205
        update-initramfs -k all -u
228
225
                $(PREFIX)/lib/mandos/plugins.d/password-prompt \
229
226
                $(PREFIX)/lib/mandos/plugins.d/mandos-client \
230
227
                $(PREFIX)/lib/mandos/plugins.d/usplash \
231
 
                $(PREFIX)/lib/mandos/plugins.d/splashy \
232
228
                $(INITRAMFSTOOLS)/hooks/mandos \
233
229
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
234
230
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \