/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-15 20:21:49 UTC
  • Revision ID: teddy@recompile.se-20240915202149-447ayubypn08tpki
Fix lintian warning "build-depends-on-obsolete-package"

Apparently, pkg-config is deprecated in favor of pkgconf:
<https://bugs.debian.org/1020799>,
<http://pkgconf-migration.debian.net/>

Therefore, prefer pkgconf in the build dependencies.

* debian/control (Source: mandos/Build-Depends): Change "pkg-config"
  to "pkgconf | pkg-config".

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
 
version:=1.8.16
 
47
version:=1.8.17
48
48
SED:=sed
49
49
PKG_CONFIG?=pkg-config
50
50
 
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 \
287
289
                --expression='s/\(mandos_\)[0-9.]\+\(\.orig\.tar\.gz\)/\1$(version)\2/' \
288
290
                $@)
289
291
 
 
292
# Does the linker support the --no-warn-execstack option?
 
293
ifeq ($(shell echo 'int main(){}'|$(CC) --language=c /dev/stdin -o /dev/null -Xlinker --no-warn-execstack >/dev/null 2>&1 && echo yes),yes)
 
294
# These programs use nested functions, which uses an executable stack
 
295
plugin-runner: LDFLAGS += -Xlinker --no-warn-execstack
 
296
dracut-module/password-agent: LDFLAGS += -Xlinker --no-warn-execstack
 
297
plugins.d/password-prompt: LDFLAGS += -Xlinker --no-warn-execstack
 
298
plugins.d/mandos-client: LDFLAGS += -Xlinker --no-warn-execstack
 
299
plugins.d/plymouth: LDFLAGS += -Xlinker --no-warn-execstack
 
300
endif
 
301
 
290
302
# Need to add the GnuTLS, Avahi and GPGME libraries
291
303
plugins.d/mandos-client: CFLAGS += $(GNUTLS_CFLAGS) $(strip \
292
304
        ) $(AVAHI_CFLAGS) $(GPGME_CFLAGS)
373
385
 
374
386
# Used by run-server
375
387
confdir/mandos.conf: mandos.conf
376
 
        install --directory confdir
377
 
        install --mode=u=rw,go=r $^ $@
 
388
        install -D --mode=u=rw,go=r $^ $@
378
389
confdir/clients.conf: clients.conf keydir/seckey.txt keydir/tls-pubkey.pem
379
 
        install --directory confdir
380
 
        install --mode=u=rw $< $@
 
390
        install -D --mode=u=rw $< $@
381
391
# Add a client password
382
392
        ./mandos-keygen --dir keydir --password --no-ssh >> $@
383
393
statedir:
388
398
 
389
399
.PHONY: install-html
390
400
install-html: html
391
 
        install --directory $(htmldir)
392
 
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
 
401
        install -D --mode=u=rw,go=r --target-directory=$(htmldir) \
393
402
                $(htmldocs)
394
403
 
395
404
.PHONY: install-server
396
405
install-server: doc
397
 
        install --directory $(CONFDIR)
398
406
        if install --directory --mode=u=rwx --owner=$(USER) \
399
407
                --group=$(GROUP) $(STATEDIR); then \
400
408
                :; \
401
409
        elif install --directory --mode=u=rwx $(STATEDIR); then \
402
410
                chown -- $(USER):$(GROUP) $(STATEDIR) || :; \
403
411
        fi
404
 
        if [ "$(TMPFILES)" != "$(DESTDIR)" \
405
 
                        -a -d "$(TMPFILES)" ]; then \
406
 
                install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
 
412
        if [ "$(TMPFILES)" != "$(DESTDIR)" ]; then \
 
413
                install -D --mode=u=rw,go=r tmpfiles.d-mandos.conf \
407
414
                        $(TMPFILES)/mandos.conf; \
408
415
        fi
409
 
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
410
 
                        -a -d "$(SYSUSERS)" ]; then \
411
 
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
416
        if [ "$(SYSUSERS)" != "$(DESTDIR)" ]; then \
 
417
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
412
418
                        $(SYSUSERS)/mandos.conf; \
413
419
        fi
414
 
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
 
420
        install --directory $(PREFIX)/sbin
 
421
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
422
                mandos
415
423
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
416
424
                mandos-ctl
417
425
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
418
426
                mandos-monitor
 
427
        install --directory $(CONFDIR)
419
428
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
420
429
                mandos.conf
421
430
        install --mode=u=rw --target-directory=$(CONFDIR) \
422
431
                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 \
 
432
        install -D --mode=u=rw,go=r dbus-mandos.conf \
 
433
                $(DBUSPOLICYDIR)/mandos.conf
 
434
        install -D --mode=u=rwx,go=rx init.d-mandos \
426
435
                $(DESTDIR)/etc/init.d/mandos
427
 
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
428
 
                install --mode=u=rw,go=r mandos.service $(SYSTEMD); \
 
436
        if [ "$(SYSTEMD)" != "$(DESTDIR)" ]; then \
 
437
                install -D --mode=u=rw,go=r mandos.service \
 
438
                        $(SYSTEMD); \
429
439
        fi
430
 
        install --mode=u=rw,go=r default-mandos \
 
440
        install -D --mode=u=rw,go=r default-mandos \
431
441
                $(DESTDIR)/etc/default/mandos
432
442
        if [ -z $(DESTDIR) ]; then \
433
443
                update-rc.d mandos defaults 25 15;\
434
444
        fi
 
445
        install --directory $(MANDIR)/man8 $(MANDIR)/man5
435
446
        gzip --best --to-stdout mandos.8 \
436
447
                > $(MANDIR)/man8/mandos.8.gz
437
448
        gzip --best --to-stdout mandos-monitor.8 \
447
458
 
448
459
.PHONY: install-client-nokey
449
460
install-client-nokey: all doc
450
 
        install --directory $(LIBDIR)/mandos $(CONFDIR)
451
461
        install --directory --mode=u=rwx $(KEYDIR) \
452
462
                $(LIBDIR)/mandos/plugins.d \
453
463
                $(LIBDIR)/mandos/plugin-helpers
454
 
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
455
 
                        -a -d "$(SYSUSERS)" ]; then \
456
 
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
464
        if [ "$(SYSUSERS)" != "$(DESTDIR)" ]; then \
 
465
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
457
466
                        $(SYSUSERS)/mandos-client.conf; \
458
467
        fi
459
468
        if [ "$(CONFDIR)" != "$(LIBDIR)/mandos" ]; then \
460
 
                install --mode=u=rwx \
461
 
                        --directory "$(CONFDIR)/plugins.d" \
 
469
                install --directory \
 
470
                        --mode=u=rwx "$(CONFDIR)/plugins.d" \
462
471
                        "$(CONFDIR)/plugin-helpers"; \
463
472
        fi
464
 
        install --mode=u=rwx,go=rx --directory \
 
473
        install --directory --mode=u=rwx,go=rx \
465
474
                "$(CONFDIR)/network-hooks.d"
466
475
        install --mode=u=rwx,go=rx \
467
476
                --target-directory=$(LIBDIR)/mandos plugin-runner
468
477
        install --mode=u=rwx,go=rx \
469
478
                --target-directory=$(LIBDIR)/mandos \
470
479
                mandos-to-cryptroot-unlock
 
480
        install --directory $(PREFIX)/sbin
471
481
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
472
482
                mandos-keygen
473
483
        install --mode=u=rwx,go=rx \
491
501
        install --mode=u=rwx,go=rx \
492
502
                --target-directory=$(LIBDIR)/mandos/plugin-helpers \
493
503
                plugin-helpers/mandos-client-iprouteadddel
494
 
        install initramfs-tools-hook \
 
504
        install -D initramfs-tools-hook \
495
505
                $(INITRAMFSTOOLS)/hooks/mandos
496
 
        install --mode=u=rw,go=r initramfs-tools-conf \
 
506
        install -D --mode=u=rw,go=r initramfs-tools-conf \
497
507
                $(INITRAMFSTOOLS)/conf.d/mandos-conf
498
 
        install --mode=u=rw,go=r initramfs-tools-conf-hook \
 
508
        install -D --mode=u=rw,go=r initramfs-tools-conf-hook \
499
509
                $(INITRAMFSTOOLS)/conf-hooks.d/zz-mandos
500
 
        install initramfs-tools-script \
 
510
        install -D initramfs-tools-script \
501
511
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
502
 
        install initramfs-tools-script-stop \
 
512
        install -D initramfs-tools-script-stop \
503
513
                $(INITRAMFSTOOLS)/scripts/local-premount/mandos
504
 
        install --directory $(DRACUTMODULE)
505
 
        install --mode=u=rw,go=r --target-directory=$(DRACUTMODULE) \
 
514
        install -D --mode=u=rw,go=r \
 
515
                --target-directory=$(DRACUTMODULE) \
506
516
                dracut-module/ask-password-mandos.path \
507
517
                dracut-module/ask-password-mandos.service
508
518
        install --mode=u=rwxs,go=rx \
511
521
                dracut-module/cmdline-mandos.sh \
512
522
                dracut-module/password-agent
513
523
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
 
524
        install --directory $(MANDIR)/man8
514
525
        gzip --best --to-stdout mandos-keygen.8 \
515
526
                > $(MANDIR)/man8/mandos-keygen.8.gz
516
527
        gzip --best --to-stdout plugin-runner.8mandos \
613
624
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
614
625
                $(DESTDIR)/etc/default/mandos \
615
626
                $(DESTDIR)/etc/init.d/mandos \
616
 
                $(SYSTEMD)/mandos.service \
617
627
                $(DESTDIR)/run/mandos.pid \
618
628
                $(DESTDIR)/var/run/mandos.pid
 
629
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
 
630
                -rm --force -- $(SYSTEMD)/mandos.service; \
 
631
        fi
619
632
        -rmdir $(CONFDIR)
620
633
 
621
634
.PHONY: purge-client