/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: 2024-09-09 02:51:47 UTC
  • Revision ID: teddy@recompile.se-20240909025147-0o7tx2njlr8hujgw
Change to new lintian override syntax

Lintian has changed its output for warnings, and as a result, its
syntax for overriding those warnings has also changed.  (See Debian
bug #1007002 for further information.)  Therefore, change the syntax
in the lintian override files.

* debian/mandos-client.lintian-overrides: Change to new lintian
  "pointed hints" syntax.
* debian/mandos.lintian-overrides: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#COVERAGE=--coverage
43
43
OPTIMIZE:=-Os -fno-strict-aliasing
44
44
LANGUAGE:=-std=gnu11
45
 
CPPFLAGS+=-D_FILE_OFFSET_BITS=64
 
45
CPPFLAGS+=-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
46
46
htmldir:=man
47
47
version:=1.8.16
48
48
SED:=sed
64
64
# DRACUTMODULE:=$(DESTDIR)/usr/lib/dracut/modules.d/90mandos
65
65
# STATEDIR:=$(DESTDIR)/var/lib/mandos
66
66
# LIBDIR:=$(PREFIX)/lib
 
67
# DBUSPOLICYDIR:=$(DESTDIR)/etc/dbus-1/system.d
67
68
##
68
69
 
69
70
## These settings are for a package-type install
84
85
                        break; \
85
86
                fi; \
86
87
        done)
 
88
DBUSPOLICYDIR:=$(DESTDIR)/usr/share/dbus-1/system.d
87
89
##
88
90
 
89
91
SYSTEMD:=$(DESTDIR)$(shell $(PKG_CONFIG) systemd \
373
375
 
374
376
# Used by run-server
375
377
confdir/mandos.conf: mandos.conf
376
 
        install --directory confdir
377
 
        install --mode=u=rw,go=r $^ $@
 
378
        install -D --mode=u=rw,go=r $^ $@
378
379
confdir/clients.conf: clients.conf keydir/seckey.txt keydir/tls-pubkey.pem
379
 
        install --directory confdir
380
 
        install --mode=u=rw $< $@
 
380
        install -D --mode=u=rw $< $@
381
381
# Add a client password
382
382
        ./mandos-keygen --dir keydir --password --no-ssh >> $@
383
383
statedir:
388
388
 
389
389
.PHONY: install-html
390
390
install-html: html
391
 
        install --directory $(htmldir)
392
 
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
 
391
        install -D --mode=u=rw,go=r --target-directory=$(htmldir) \
393
392
                $(htmldocs)
394
393
 
395
394
.PHONY: install-server
396
395
install-server: doc
397
 
        install --directory $(CONFDIR)
398
396
        if install --directory --mode=u=rwx --owner=$(USER) \
399
397
                --group=$(GROUP) $(STATEDIR); then \
400
398
                :; \
401
399
        elif install --directory --mode=u=rwx $(STATEDIR); then \
402
400
                chown -- $(USER):$(GROUP) $(STATEDIR) || :; \
403
401
        fi
404
 
        if [ "$(TMPFILES)" != "$(DESTDIR)" \
405
 
                        -a -d "$(TMPFILES)" ]; then \
406
 
                install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
 
402
        if [ "$(TMPFILES)" != "$(DESTDIR)" ]; then \
 
403
                install -D --mode=u=rw,go=r tmpfiles.d-mandos.conf \
407
404
                        $(TMPFILES)/mandos.conf; \
408
405
        fi
409
 
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
410
 
                        -a -d "$(SYSUSERS)" ]; then \
411
 
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
406
        if [ "$(SYSUSERS)" != "$(DESTDIR)" ]; then \
 
407
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
412
408
                        $(SYSUSERS)/mandos.conf; \
413
409
        fi
414
 
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
 
410
        install --directory $(PREFIX)/sbin
 
411
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
412
                mandos
415
413
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
416
414
                mandos-ctl
417
415
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
418
416
                mandos-monitor
 
417
        install --directory $(CONFDIR)
419
418
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
420
419
                mandos.conf
421
420
        install --mode=u=rw --target-directory=$(CONFDIR) \
422
421
                clients.conf
423
 
        install --mode=u=rw,go=r dbus-mandos.conf \
424
 
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
425
 
        install --mode=u=rwx,go=rx init.d-mandos \
 
422
        install -D --mode=u=rw,go=r dbus-mandos.conf \
 
423
                $(DBUSPOLICYDIR)/mandos.conf
 
424
        install -D --mode=u=rwx,go=rx init.d-mandos \
426
425
                $(DESTDIR)/etc/init.d/mandos
427
 
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
428
 
                install --mode=u=rw,go=r mandos.service $(SYSTEMD); \
 
426
        if [ "$(SYSTEMD)" != "$(DESTDIR)" ]; then \
 
427
                install -D --mode=u=rw,go=r mandos.service \
 
428
                        $(SYSTEMD); \
429
429
        fi
430
 
        install --mode=u=rw,go=r default-mandos \
 
430
        install -D --mode=u=rw,go=r default-mandos \
431
431
                $(DESTDIR)/etc/default/mandos
432
432
        if [ -z $(DESTDIR) ]; then \
433
433
                update-rc.d mandos defaults 25 15;\
434
434
        fi
 
435
        install --directory $(MANDIR)/man8 $(MANDIR)/man5
435
436
        gzip --best --to-stdout mandos.8 \
436
437
                > $(MANDIR)/man8/mandos.8.gz
437
438
        gzip --best --to-stdout mandos-monitor.8 \
447
448
 
448
449
.PHONY: install-client-nokey
449
450
install-client-nokey: all doc
450
 
        install --directory $(LIBDIR)/mandos $(CONFDIR)
451
451
        install --directory --mode=u=rwx $(KEYDIR) \
452
452
                $(LIBDIR)/mandos/plugins.d \
453
453
                $(LIBDIR)/mandos/plugin-helpers
454
 
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
455
 
                        -a -d "$(SYSUSERS)" ]; then \
456
 
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
454
        if [ "$(SYSUSERS)" != "$(DESTDIR)" ]; then \
 
455
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
457
456
                        $(SYSUSERS)/mandos-client.conf; \
458
457
        fi
459
458
        if [ "$(CONFDIR)" != "$(LIBDIR)/mandos" ]; then \
460
 
                install --mode=u=rwx \
461
 
                        --directory "$(CONFDIR)/plugins.d" \
 
459
                install --directory \
 
460
                        --mode=u=rwx "$(CONFDIR)/plugins.d" \
462
461
                        "$(CONFDIR)/plugin-helpers"; \
463
462
        fi
464
 
        install --mode=u=rwx,go=rx --directory \
 
463
        install --directory --mode=u=rwx,go=rx \
465
464
                "$(CONFDIR)/network-hooks.d"
466
465
        install --mode=u=rwx,go=rx \
467
466
                --target-directory=$(LIBDIR)/mandos plugin-runner
468
467
        install --mode=u=rwx,go=rx \
469
468
                --target-directory=$(LIBDIR)/mandos \
470
469
                mandos-to-cryptroot-unlock
 
470
        install --directory $(PREFIX)/sbin
471
471
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
472
472
                mandos-keygen
473
473
        install --mode=u=rwx,go=rx \
491
491
        install --mode=u=rwx,go=rx \
492
492
                --target-directory=$(LIBDIR)/mandos/plugin-helpers \
493
493
                plugin-helpers/mandos-client-iprouteadddel
494
 
        install initramfs-tools-hook \
 
494
        install -D initramfs-tools-hook \
495
495
                $(INITRAMFSTOOLS)/hooks/mandos
496
 
        install --mode=u=rw,go=r initramfs-tools-conf \
 
496
        install -D --mode=u=rw,go=r initramfs-tools-conf \
497
497
                $(INITRAMFSTOOLS)/conf.d/mandos-conf
498
 
        install --mode=u=rw,go=r initramfs-tools-conf-hook \
 
498
        install -D --mode=u=rw,go=r initramfs-tools-conf-hook \
499
499
                $(INITRAMFSTOOLS)/conf-hooks.d/zz-mandos
500
 
        install initramfs-tools-script \
 
500
        install -D initramfs-tools-script \
501
501
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
502
 
        install initramfs-tools-script-stop \
 
502
        install -D initramfs-tools-script-stop \
503
503
                $(INITRAMFSTOOLS)/scripts/local-premount/mandos
504
 
        install --directory $(DRACUTMODULE)
505
 
        install --mode=u=rw,go=r --target-directory=$(DRACUTMODULE) \
 
504
        install -D --mode=u=rw,go=r \
 
505
                --target-directory=$(DRACUTMODULE) \
506
506
                dracut-module/ask-password-mandos.path \
507
507
                dracut-module/ask-password-mandos.service
508
508
        install --mode=u=rwxs,go=rx \
511
511
                dracut-module/cmdline-mandos.sh \
512
512
                dracut-module/password-agent
513
513
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
 
514
        install --directory $(MANDIR)/man8
514
515
        gzip --best --to-stdout mandos-keygen.8 \
515
516
                > $(MANDIR)/man8/mandos-keygen.8.gz
516
517
        gzip --best --to-stdout plugin-runner.8mandos \
613
614
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
614
615
                $(DESTDIR)/etc/default/mandos \
615
616
                $(DESTDIR)/etc/init.d/mandos \
616
 
                $(SYSTEMD)/mandos.service \
617
617
                $(DESTDIR)/run/mandos.pid \
618
618
                $(DESTDIR)/var/run/mandos.pid
 
619
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
 
620
                -rm --force -- $(SYSTEMD)/mandos.service; \
 
621
        fi
619
622
        -rmdir $(CONFDIR)
620
623
 
621
624
.PHONY: purge-client