/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 debian/rules

  • Committer: Teddy Hogeborn
  • Date: 2024-09-08 17:17:22 UTC
  • Revision ID: teddy@recompile.se-20240908171722-oqkqtp0zto6ze2m6
Do not hardcode directory names; get them from pkg-config

Similarly to the directory for systemd unit files (output of
"pkg-config systemd --variable=systemdsystemunitdir"), the values of
the "tmpfilesdir" and "sysusersdir" variables should not be hardcoded
in debian/mandos.dirs and debian/mandos-client.dirs.  Fix this the
same way as with systemdsystemunitdir; i.e. remove the directories
from the .dirs files, and instead create the directories in override
rules in debian/rules.

* debian/mandos-client.dirs (usr/lib/sysusers.d): Removed.
* debian/mandos.dirs (usr/lib/tmpfiles.d, usr/lib/sysusers.d):
  Removed.
* debian/rules (override_dh_installdirs-indep): Also create
  directories for the "tmpfilesdir" and "sysusersdir" variables from
  pkg-config.
  (override_dh_installdirs-arch): New; create directory for the
  "sysusersdir" variable from pkg-config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    MAKEFLAGS += -j$(NUMJOBS)
10
10
endif
11
11
 
 
12
PKG_CONFIG?=pkg-config
 
13
 
12
14
%:
13
15
        dh $@
14
16
 
 
17
override_dh_installdirs-indep:
 
18
        dh_installdirs
 
19
        dh_installdirs $(patsubst /%,%,$(shell $(PKG_CONFIG) \
 
20
                systemd --variable=systemdsystemunitdir)) \
 
21
                $(patsubst /%,%,$(shell $(PKG_CONFIG) \
 
22
                systemd --variable=tmpfilesdir)) \
 
23
                $(patsubst /%,%,$(shell $(PKG_CONFIG) \
 
24
                systemd --variable=sysusersdir))
 
25
 
 
26
override_dh_installdirs-arch:
 
27
        dh_installdirs
 
28
        dh_installdirs $(patsubst /%,%,$(shell $(PKG_CONFIG) \
 
29
                systemd --variable=sysusersdir))
 
30
 
15
31
override_dh_auto_build-arch:
16
32
        LC_ALL=en_US.utf8 dh_auto_build -- all doc
17
33
 
35
51
                --exclude etc/mandos/plugin-helpers \
36
52
                --exclude usr/lib/$(DEB_HOST_MULTIARCH)/mandos/plugins.d \
37
53
                --exclude usr/lib/$(DEB_HOST_MULTIARCH)/mandos/plugin-helpers \
38
 
                --exclude usr/share/doc/mandos-client/examples/network-hooks.d
 
54
                --exclude usr/share/doc/mandos-client/examples/network-hooks.d/
39
55
        chmod --recursive g-w -- \
40
56
        "$(CURDIR)/debian/mandos-client/usr/share/doc/mandos-client/examples/network-hooks.d"
41
57
 
53
69
#bpo#   -gnutls_version=$$(dpkg-query --showformat='$${Version}' \
54
70
#bpo#           --show libgnutls30); \
55
71
#bpo#   dpkg --compare-versions $$gnutls_version lt 3.6.0 \
56
 
#bpo#           && { cp --archive debian/control debian/control.orig; sed --expression='s/libgnutls28-dev (>= 3\.6\.6) |//' debian/control; }
 
72
#bpo#           && { cp --archive debian/control debian/control.orig; sed --in-place --expression='s/libgnutls28-dev (>= 3\.6\.6) |//' debian/control; }
57
73
#bpo#   dh_shlibdeps
58
74
#bpo#   -gnutls_version=$$(dpkg-query --showformat='$${Version}' \
59
75
#bpo#           --show libgnutls30); \