/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-07 09:36:35 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080907093635-yg1y272yv53dijhp
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
                      /usr/local install and a package install.
  (KEYDIR): Changed /usr/local install value to be "/etc/mandos/keys".
  (INITRAMFSTOOLS): Use $(DESTDIR) in /usr/local value too.

* initramfs-tools-hook: Look in "/etc/mandos/keys" too.

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 plugins.d/askpass-fifo
 
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
 
        install --mode=u=rwxs,go=rx \
190
 
                --target-directory=$(PREFIX)/lib/mandos/plugins.d \
191
 
                plugins.d/askpass-fifo
192
188
        install initramfs-tools-hook \
193
189
                $(INITRAMFSTOOLS)/hooks/mandos
194
 
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
 
190
        install initramfs-tools-hook-conf \
195
191
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
196
192
        install initramfs-tools-script \
197
193
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
204
200
                > $(MANDIR)/man8/password-prompt.8mandos.gz
205
201
        gzip --best --to-stdout plugins.d/mandos-client.8mandos \
206
202
                > $(MANDIR)/man8/mandos-client.8mandos.gz
207
 
 
208
 
install-client: install-client-nokey
209
203
# Post-installation stuff
210
204
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
211
205
        update-initramfs -k all -u
231
225
                $(PREFIX)/lib/mandos/plugins.d/password-prompt \
232
226
                $(PREFIX)/lib/mandos/plugins.d/mandos-client \
233
227
                $(PREFIX)/lib/mandos/plugins.d/usplash \
234
 
                $(PREFIX)/lib/mandos/plugins.d/splashy \
235
228
                $(INITRAMFSTOOLS)/hooks/mandos \
236
229
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
237
230
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \