Browse Source

Take the systemd service unit location from systemd.pc/systemdsystemunitdir. Closes: #1052632

Christoph Biedl 1 year ago
parent
commit
a87dc0bf70
3 changed files with 5 additions and 2 deletions
  1. 2 2
      debian/clevis-systemd.install
  2. 1 0
      debian/control
  3. 2 0
      debian/rules

+ 2 - 2
debian/clevis-systemd.install

@@ -1,5 +1,5 @@
 
-lib/systemd/system/clevis-luks-askpass.path usr/lib/systemd/system
-lib/systemd/system/clevis-luks-askpass.service usr/lib/systemd/system
+${env:systemdsystemunitdir}/clevis-luks-askpass.path
+${env:systemdsystemunitdir}/clevis-luks-askpass.service
 
 usr/libexec/clevis-luks-askpass

+ 1 - 0
debian/control

@@ -22,6 +22,7 @@ Build-Depends: debhelper-compat (= 13),
     libssl-dev,
     libudisks2-dev,
     meson,
+    pkgconf,
     systemd,
     tang,
     tpm2-tools,

+ 2 - 0
debian/rules

@@ -4,6 +4,8 @@ export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+export systemdsystemunitdir = $(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,)
+
 %:
 	dh $@ --with=bash-completion