/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: 2019-09-04 05:31:20 UTC
  • Revision ID: teddy@recompile.se-20190904053120-b85b56a5kdrnxhbx
Fix server Debian package test

* debian/tests/control (mandos-check/Restrictions): Add
                                                    "allow-stderr".

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
LANGUAGE:=-std=gnu11
44
44
FEATURES:=-D_FILE_OFFSET_BITS=64
45
45
htmldir:=man
46
 
version:=1.8.11
 
46
version:=1.8.9
47
47
SED:=sed
48
48
PKG_CONFIG?=pkg-config
49
49
 
156
156
 
157
157
objects:=$(addsuffix .o,$(CPROGS))
158
158
 
159
 
.PHONY: all
160
159
all: $(PROGS) mandos.lsm
161
160
 
162
 
.PHONY: doc
163
161
doc: $(DOCS)
164
162
 
165
 
.PHONY: html
166
163
html: $(htmldocs)
167
164
 
168
165
%.5: %.xml common.ent legalnotice.xml
285
282
                $@)
286
283
 
287
284
# Need to add the GnuTLS, Avahi and GPGME libraries
288
 
plugins.d/mandos-client: CFLAGS += $(GNUTLS_CFLAGS) $(strip \
289
 
        ) $(AVAHI_CFLAGS) $(GPGME_CFLAGS)
290
 
plugins.d/mandos-client: LDLIBS += $(GNUTLS_LIBS) $(strip \
291
 
        ) $(AVAHI_LIBS) $(GPGME_LIBS)
 
285
plugins.d/mandos-client: plugins.d/mandos-client.c
 
286
        $(LINK.c) $^ $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(strip\
 
287
                ) $(GPGME_CFLAGS) $(GNUTLS_LIBS) $(strip\
 
288
                ) $(AVAHI_LIBS) $(GPGME_LIBS) $(LOADLIBES) $(strip\
 
289
                ) $(LDLIBS) -o $@
292
290
 
293
291
# Need to add the libnl-route library
294
 
plugin-helpers/mandos-client-iprouteadddel: CFLAGS += $(LIBNL3_CFLAGS)
295
 
plugin-helpers/mandos-client-iprouteadddel: LDLIBS += $(LIBNL3_LIBS)
 
292
plugin-helpers/mandos-client-iprouteadddel: plugin-helpers/mandos-client-iprouteadddel.c
 
293
        $(LINK.c) $(LIBNL3_CFLAGS) $^ $(LIBNL3_LIBS) $(strip\
 
294
                ) $(LOADLIBES) $(LDLIBS) -o $@
296
295
 
297
296
# Need to add the GLib and pthread libraries
298
 
dracut-module/password-agent: CFLAGS += $(GLIB_CFLAGS)
299
 
dracut-module/password-agent: LDLIBS += $(GLIB_LIBS) -lpthread
300
 
 
301
 
.PHONY: clean
 
297
dracut-module/password-agent: dracut-module/password-agent.c
 
298
        $(LINK.c) $(GLIB_CFLAGS) $^ $(GLIB_LIBS) -lpthread $(strip\
 
299
                ) $(LOADLIBES) $(LDLIBS) -o $@
 
300
 
 
301
.PHONY : all doc html clean distclean mostlyclean maintainer-clean \
 
302
        check run-client run-server install install-html \
 
303
        install-server install-client-nokey install-client uninstall \
 
304
        uninstall-server uninstall-client purge purge-server \
 
305
        purge-client
 
306
 
302
307
clean:
303
308
        -rm --force $(CPROGS) $(objects) $(htmldocs) $(DOCS) core
304
309
 
305
 
.PHONY: distclean
306
310
distclean: clean
307
 
.PHONY: mostlyclean
308
311
mostlyclean: clean
309
 
.PHONY: maintainer-clean
310
312
maintainer-clean: clean
311
313
        -rm --force --recursive keydir confdir statedir
312
314
 
313
 
.PHONY: check
314
315
check: all
315
316
        ./mandos --check
316
317
        ./mandos-ctl --check
320
321
        ./dracut-module/password-agent --test
321
322
 
322
323
# Run the client with a local config and key
323
 
.PHONY: run-client
324
324
run-client: all keydir/seckey.txt keydir/pubkey.txt \
325
325
                        keydir/tls-privkey.pem keydir/tls-pubkey.pem
326
326
        @echo '######################################################'
354
354
keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem: mandos-keygen
355
355
        install --directory keydir
356
356
        ./mandos-keygen --dir keydir --force
357
 
        if ! [ -e keydir/tls-privkey.pem ]; then \
358
 
                install --mode=u=rw /dev/null keydir/tls-privkey.pem; \
359
 
        fi
360
 
        if ! [ -e keydir/tls-pubkey.pem ]; then \
361
 
                install --mode=u=rw /dev/null keydir/tls-pubkey.pem; \
362
 
        fi
363
357
 
364
358
# Run the server with a local config
365
 
.PHONY: run-server
366
359
run-server: confdir/mandos.conf confdir/clients.conf statedir
367
360
        ./mandos --debug --no-dbus --configdir=confdir \
368
361
                --statedir=statedir $(SERVERARGS)
379
372
statedir:
380
373
        install --directory statedir
381
374
 
382
 
.PHONY: install
383
375
install: install-server install-client-nokey
384
376
 
385
 
.PHONY: install-html
386
377
install-html: html
387
378
        install --directory $(htmldir)
388
379
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
389
380
                $(htmldocs)
390
381
 
391
 
.PHONY: install-server
392
382
install-server: doc
393
383
        install --directory $(CONFDIR)
394
384
        if install --directory --mode=u=rwx --owner=$(USER) \
441
431
        gzip --best --to-stdout intro.8mandos \
442
432
                > $(MANDIR)/man8/intro.8mandos.gz
443
433
 
444
 
.PHONY: install-client-nokey
445
434
install-client-nokey: all doc
446
435
        install --directory $(LIBDIR)/mandos $(CONFDIR)
447
436
        install --directory --mode=u=rwx $(KEYDIR) \
526
515
        gzip --best --to-stdout dracut-module/password-agent.8mandos \
527
516
                > $(MANDIR)/man8/password-agent.8mandos.gz
528
517
 
529
 
.PHONY: install-client
530
518
install-client: install-client-nokey
531
519
# Post-installation stuff
532
520
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
542
530
        fi
543
531
        echo "Now run mandos-keygen --password --dir $(KEYDIR)"
544
532
 
545
 
.PHONY: uninstall
546
533
uninstall: uninstall-server uninstall-client
547
534
 
548
 
.PHONY: uninstall-server
549
535
uninstall-server:
550
536
        -rm --force $(PREFIX)/sbin/mandos \
551
537
                $(PREFIX)/sbin/mandos-ctl \
558
544
        update-rc.d -f mandos remove
559
545
        -rmdir $(CONFDIR)
560
546
 
561
 
.PHONY: uninstall-client
562
547
uninstall-client:
563
548
# Refuse to uninstall client if /etc/crypttab is explicitly configured
564
549
# to use it.
600
585
            done; \
601
586
        fi
602
587
 
603
 
.PHONY: purge
604
588
purge: purge-server purge-client
605
589
 
606
 
.PHONY: purge-server
607
590
purge-server: uninstall-server
608
591
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
609
592
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
614
597
                $(DESTDIR)/var/run/mandos.pid
615
598
        -rmdir $(CONFDIR)
616
599
 
617
 
.PHONY: purge-client
618
600
purge-client: uninstall-client
619
601
        -shred --remove $(KEYDIR)/seckey.txt $(KEYDIR)/tls-privkey.pem
620
602
        -rm --force $(CONFDIR)/plugin-runner.conf \