/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-11-17 18:43:11 UTC
  • Revision ID: teddy@recompile.se-20241117184311-ox25kvngy62h209g
Debian package: Avoid suggesting a C compiler unnecessarily

The list of suggested packages, meant to enable the "mandos" program
to find the correct value of SO_BINDTODEVICE by using a C compiler,
are not necessary when Python 3.3 or later is used, since it has the
SO_BINDTODEVICE constant defined in the "socket" module.  Also, Python
2.6 or older has the same constant in the old "IN" module.  Therefore,
we should suggest these Python versions as alternatives to a C
compiler, so that a C compiler is not installed unnecessarily.

debian/control (Package: mandos/Suggests): Add "python3 (>= 3.3)" and
"python (<= 2.6)" as alternatives to "libc6-dev | libc-dev" and
"c-compiler".

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
LANGUAGE:=-std=gnu11
45
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
 
57
57
 
58
58
## Use these settings for a traditional /usr/local install
59
59
# PREFIX:=$(DESTDIR)/usr/local
 
60
# BINDIR:=$(PREFIX)/sbin
60
61
# CONFDIR:=$(DESTDIR)/etc/mandos
61
62
# KEYDIR:=$(DESTDIR)/etc/mandos/keys
62
63
# MANDIR:=$(PREFIX)/man
69
70
 
70
71
## These settings are for a package-type install
71
72
PREFIX:=$(DESTDIR)/usr
 
73
BINDIR:=$(PREFIX)/sbin
72
74
CONFDIR:=$(DESTDIR)/etc/mandos
73
75
KEYDIR:=$(DESTDIR)/etc/keys/mandos
74
76
MANDIR:=$(PREFIX)/share/man
417
419
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
418
420
                        $(SYSUSERS)/mandos.conf; \
419
421
        fi
420
 
        install --directory $(PREFIX)/sbin
421
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
422
 
                mandos
423
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
422
        install --directory $(BINDIR)
 
423
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) mandos
 
424
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
424
425
                mandos-ctl
425
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
426
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
426
427
                mandos-monitor
427
428
        install --directory $(CONFDIR)
428
429
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
477
478
        install --mode=u=rwx,go=rx \
478
479
                --target-directory=$(LIBDIR)/mandos \
479
480
                mandos-to-cryptroot-unlock
480
 
        install --directory $(PREFIX)/sbin
481
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
481
        install --directory $(BINDIR)
 
482
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
482
483
                mandos-keygen
483
484
        install --mode=u=rwx,go=rx \
484
485
                --target-directory=$(LIBDIR)/mandos/plugins.d \
544
545
.PHONY: install-client
545
546
install-client: install-client-nokey
546
547
# Post-installation stuff
547
 
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
 
548
        -$(BINDIR)/mandos-keygen --dir "$(KEYDIR)"
548
549
        if command -v update-initramfs >/dev/null; then \
549
550
            update-initramfs -k all -u; \
550
551
        elif command -v dracut >/dev/null; then \
562
563
 
563
564
.PHONY: uninstall-server
564
565
uninstall-server:
565
 
        -rm --force $(PREFIX)/sbin/mandos \
566
 
                $(PREFIX)/sbin/mandos-ctl \
567
 
                $(PREFIX)/sbin/mandos-monitor \
 
566
        -rm --force $(BINDIR)/mandos \
 
567
                $(BINDIR)/mandos-ctl \
 
568
                $(BINDIR)/mandos-monitor \
568
569
                $(MANDIR)/man8/mandos.8.gz \
569
570
                $(MANDIR)/man8/mandos-monitor.8.gz \
570
571
                $(MANDIR)/man8/mandos-ctl.8.gz \
579
580
# to use it.
580
581
        ! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
581
582
                $(DESTDIR)/etc/crypttab
582
 
        -rm --force $(PREFIX)/sbin/mandos-keygen \
 
583
        -rm --force $(BINDIR)/mandos-keygen \
583
584
                $(LIBDIR)/mandos/plugin-runner \
584
585
                $(LIBDIR)/mandos/plugins.d/password-prompt \
585
586
                $(LIBDIR)/mandos/plugins.d/mandos-client \