/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: 2013-10-20 15:25:09 UTC
  • Revision ID: teddy@recompile.se-20131020152509-zkhuy2yse76w10hg
* Makefile (CFLAGS, LDFLAGS): Keep default flags from environment.
  (purge-server): PID file changed to "/run/mandos.pid".
* debian/compat: Changed to "9".
* debian/control (Standards-Version): Updated to "3.9.4".
  (DM-Upload-Allowed): Removed.
  (mandos/Depends): Add "initscripts (>= 2.88dsf-13.3)" to be able to
                    use the "/run" directory (for mandos.pid).
* debian/copyright (Copyright): Update year.
* init.d-mandos (PIDFILE): Changed to "/run/mandos.pid".
* mandos: Update copyright year.
  (pidfilename): Changed to "/run/mandos.pid".
* mandos-clients.conf.xml (OPTIONS/approval_delay): Bug fix: default
                                                    is "PT0S" - using
                                                    the new RFC 3339
                                                    duration syntax.
* mandos-keygen: Update copyright year.
* mandos-monitor: - '' -
* mandos.conf.xml: - '' -
* mandos.xml: - '' -
  (FILES): PID file changed to "/run/mandos.pid".
* plugin-runner.c: Update copyright year.
* plugins.d/mandos-client.c: - '' -
* plugins.d/mandos-client.xml: - '' -
* plugins.d/password-prompt.c: - '' -
* plugins.d/plymouth.c: - '' -

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.6.1
27
27
SED=sed
28
28
 
29
29
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
56
56
        getconf LFS_LDFLAGS)
57
57
 
58
58
# Do not change these two
59
 
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
 
59
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
60
60
        $(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
61
61
        -DVERSION='"$(version)"'
62
 
LDFLAGS=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
 
62
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
63
63
 
64
64
# Commands to format a DocBook <refentry> document into a manual page
65
65
DOCBOOKTOMAN=$(strip cd $(dir $<); xsltproc --nonet --xinclude \
68
68
        --param make.single.year.ranges         1 \
69
69
        --param man.output.quietly              1 \
70
70
        --param man.authors.section.enabled     0 \
71
 
         /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
 
71
        /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
72
72
        $(notdir $<); \
73
73
        $(MANPOST) $(notdir $@);\
74
 
        LANG=en_US.UTF-8 MANWIDTH=80 man --warnings --encoding=UTF-8 \
75
 
        --local-file $(notdir $@) >/dev/null)
 
74
        if locale --all 2>/dev/null | grep --regexp='^en_US\.utf8$$' \
 
75
        && type man 2>/dev/null; then LANG=en_US.UTF-8 MANWIDTH=80 \
 
76
        man --warnings --encoding=UTF-8 --local-file $(notdir $@); \
 
77
        fi >/dev/null)
76
78
# DocBook-to-man post-processing to fix a '\n' escape bug
77
79
MANPOST=$(SED) --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
78
80
 
239
241
 
240
242
check:  all
241
243
        ./mandos --check
 
244
        ./mandos-ctl --check
242
245
 
243
246
# Run the client with a local config and key
244
247
run-client: all keydir/seckey.txt keydir/pubkey.txt
255
258
        @echo "###################################################################"
256
259
        ./plugin-runner --plugin-dir=plugins.d \
257
260
                --config-file=plugin-runner.conf \
258
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
 
261
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
259
262
                $(CLIENTARGS)
260
263
 
261
264
# Used by run-client
264
267
        ./mandos-keygen --dir keydir --force
265
268
 
266
269
# Run the server with a local config
267
 
run-server: confdir/mandos.conf confdir/clients.conf
 
270
run-server: confdir/mandos.conf confdir/clients.conf statedir
268
271
        ./mandos --debug --no-dbus --configdir=confdir \
269
272
                --statedir=statedir $(SERVERARGS)
270
273
 
319
322
                > $(MANDIR)/man5/mandos.conf.5.gz
320
323
        gzip --best --to-stdout mandos-clients.conf.5 \
321
324
                > $(MANDIR)/man5/mandos-clients.conf.5.gz
 
325
        gzip --best --to-stdout intro.8mandos \
 
326
                > $(MANDIR)/man8/intro.8mandos.gz
322
327
 
323
328
install-client-nokey: all doc
324
329
        install --directory $(PREFIX)/lib/mandos $(CONFDIR)
328
333
                install --mode=u=rwx \
329
334
                        --directory "$(CONFDIR)/plugins.d"; \
330
335
        fi
 
336
        install --mode=u=rwx,go=rx --directory \
 
337
                "$(CONFDIR)/network-hooks.d"
331
338
        install --mode=u=rwx,go=rx \
332
339
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
333
340
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
429
436
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
430
437
                $(DESTDIR)/etc/default/mandos \
431
438
                $(DESTDIR)/etc/init.d/mandos \
432
 
                $(DESTDIR)/var/run/mandos.pid
 
439
                $(DESTDIR)/run/mandos.pid
433
440
        -rmdir $(CONFDIR)
434
441
 
435
442
purge-client: uninstall-client