/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2024-09-08 07:15:13 UTC
  • mto: This revision was merged to the branch mainline in revision 410.
  • Revision ID: teddy@recompile.se-20240908071513-2jnx7ja8hlct42hl
Minor fix for manual Makefile uninstallations

If the Mandos systemd unit file was not installed, it was still
removed by the "purge-server" target.  If systemd is not installed,
this could mean removal of "mandos.service" from the root directory.

(Note: this was *not* used by the Debian package as a method of
uninstallation; this was only ever done by the Makefile if "make
purge-server" was called by hand.  And a "mandos.service" file was
presumably also unlikely to exist in the root directory.)

* Makefile (purge-server): Only remove systemd service file
  "mandos.service" if the same conditions exist which permitted its
  initial installation in the "install-server" target.

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 \
421
423
        install --mode=u=rw --target-directory=$(CONFDIR) \
422
424
                clients.conf
423
425
        install --mode=u=rw,go=r dbus-mandos.conf \
424
 
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
 
426
                $(DBUSPOLICYDIR)/mandos.conf
425
427
        install --mode=u=rwx,go=rx init.d-mandos \
426
428
                $(DESTDIR)/etc/init.d/mandos
427
429
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
613
615
                $(DESTDIR)/etc/dbus-1/system.d/mandos.conf
614
616
                $(DESTDIR)/etc/default/mandos \
615
617
                $(DESTDIR)/etc/init.d/mandos \
616
 
                $(SYSTEMD)/mandos.service \
617
618
                $(DESTDIR)/run/mandos.pid \
618
619
                $(DESTDIR)/var/run/mandos.pid
 
620
        if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
 
621
                -rm --force -- $(SYSTEMD)/mandos.service; \
 
622
        fi
619
623
        -rmdir $(CONFDIR)
620
624
 
621
625
.PHONY: purge-client