/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: 2012-06-01 21:48:12 UTC
  • Revision ID: teddy@recompile.se-20120601214812-g7685v5oeiuhi2qw
* debian/copyright (Copyright): Join the two lines to one line.
* debian/mandos-client.README.Debian: Refer to new location of example
  network hooks.
* debian/mandos-client.docs (network-hooks.d): Removed.
* debian/mandos-client.examples: New; contains "network-hooks.d".
* debian/rules (binary-common): Added "dh_installexamples".
  (binary-common/dh_fixperms): Changed to exclude new location of
  "network-hooks.d".
* init.d-mandos (status): Support new "status" action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
OPTIMIZE=-Os
24
24
LANGUAGE=-std=gnu99
25
25
htmldir=man
26
 
version=1.4.1
 
26
version=1.5.5
27
27
SED=sed
28
28
 
 
29
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
 
30
GROUP=$(firstword $(subst :, ,$(shell getent group _mandos || getent group nobody || echo 65534)))
 
31
 
29
32
## Use these settings for a traditional /usr/local install
30
33
# PREFIX=$(DESTDIR)/usr/local
31
34
# CONFDIR=$(DESTDIR)/etc/mandos
32
35
# KEYDIR=$(DESTDIR)/etc/mandos/keys
33
36
# MANDIR=$(PREFIX)/man
34
37
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
 
38
# STATEDIR=$(DESTDIR)/var/lib/mandos
35
39
##
36
40
 
37
41
## These settings are for a package-type install
40
44
KEYDIR=$(DESTDIR)/etc/keys/mandos
41
45
MANDIR=$(PREFIX)/share/man
42
46
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
 
47
STATEDIR=$(DESTDIR)/var/lib/mandos
43
48
##
44
49
 
45
50
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
66
71
         /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
67
72
        $(notdir $<); \
68
73
        $(MANPOST) $(notdir $@);\
69
 
        LANG=en_US.UTF-8 MANWIDTH=80 man --warnings --encoding=UTF-8 \
70
 
        --local-file $(notdir $@) >/dev/null)
 
74
        if locale --all | grep --regexp='^en_US\.utf8$$' && type man \
 
75
        2>/dev/null; then LANG=en_US.UTF-8 MANWIDTH=80 man \
 
76
        --warnings --encoding=UTF-8 --local-file $(notdir $@); fi \
 
77
        >/dev/null)
71
78
# DocBook-to-man post-processing to fix a '\n' escape bug
72
79
MANPOST=$(SED) --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
73
80
 
230
237
distclean: clean
231
238
mostlyclean: clean
232
239
maintainer-clean: clean
233
 
        -rm --force --recursive keydir confdir
 
240
        -rm --force --recursive keydir confdir statedir
234
241
 
235
242
check:  all
236
243
        ./mandos --check
250
257
        @echo "###################################################################"
251
258
        ./plugin-runner --plugin-dir=plugins.d \
252
259
                --config-file=plugin-runner.conf \
253
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
 
260
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
254
261
                $(CLIENTARGS)
255
262
 
256
263
# Used by run-client
259
266
        ./mandos-keygen --dir keydir --force
260
267
 
261
268
# Run the server with a local config
262
 
run-server: confdir/mandos.conf confdir/clients.conf
263
 
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
 
269
run-server: confdir/mandos.conf confdir/clients.conf statedir
 
270
        ./mandos --debug --no-dbus --configdir=confdir \
 
271
                --statedir=statedir $(SERVERARGS)
264
272
 
265
273
# Used by run-server
266
274
confdir/mandos.conf: mandos.conf
271
279
        install --mode=u=rw $< $@
272
280
# Add a client password
273
281
        ./mandos-keygen --dir keydir --password >> $@
 
282
statedir:
 
283
        install --directory statedir
274
284
 
275
285
install: install-server install-client-nokey
276
286
 
281
291
 
282
292
install-server: doc
283
293
        install --directory $(CONFDIR)
 
294
        install --directory --mode=u=rwx --owner=$(USER) \
 
295
                --group=$(GROUP) $(STATEDIR)
284
296
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
285
297
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
286
298
                mandos-ctl
309
321
                > $(MANDIR)/man5/mandos.conf.5.gz
310
322
        gzip --best --to-stdout mandos-clients.conf.5 \
311
323
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
 
324
        gzip --best --to-stdout intro.8mandos \
 
325
                > $(MANDIR)/man8/intro.8mandos.gz
312
326
 
313
327
install-client-nokey: all doc
314
328
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
318
332
                install --mode=u=rwx \
319
333
                        --directory "$(CONFDIR)/plugins.d"; \
320
334
        fi
 
335
        install --mode=u=rwx,go=rx --directory \
 
336
                "$(CONFDIR)/network-hooks.d"
321
337
        install --mode=u=rwx,go=rx \
322
338
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
323
339
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \