diff --git a/debian/freeipa-client-epn.install b/debian/freeipa-client-epn.install index b3a99b2..7edc5e2 100644 --- a/debian/freeipa-client-epn.install +++ b/debian/freeipa-client-epn.install @@ -1,7 +1,7 @@ etc/ipa/epn.conf etc/ipa/epn/expire_msg.template -${env:systemdsystemunitdir}/ipa-epn.service -${env:systemdsystemunitdir}/ipa-epn.timer +@systemdsystemunitdir@/ipa-epn.service +@systemdsystemunitdir@/ipa-epn.timer usr/sbin/ipa-epn usr/share/man/man1/ipa-epn.1 usr/share/man/man5/epn.conf.5 diff --git a/debian/rules b/debian/rules index 1946382..9e0423f 100755 --- a/debian/rules +++ b/debian/rules @@ -20,13 +20,12 @@ DESTDIR=$(CURDIR)/debian/tmp export PYTHON=python3 export am_cv_python_pythondir=/usr/lib/python3/dist-packages export am_cv_python_pyexecdir=/usr/lib/python3/dist-packages -#export systemdsystemunitdir=$(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,) +# Detect systemd unit dir with fallback systemdsystemunitdir := $(shell pkgconf --variable=systemdsystemunitdir systemd 2>/dev/null | sed 's,^/,,') ifeq ($(systemdsystemunitdir),) systemdsystemunitdir := lib/systemd/system endif - export systemdsystemunitdir confflags = \ @@ -132,6 +131,7 @@ override_dh_fixperms: fi override_dh_gencontrol: + echo "systemdsystemunitdir=$(systemdsystemunitdir)" >> debian/substvars dh_gencontrol -- \ -Vlib:Depends=$(shell dpkg-query -W -f '$${Depends}' librpm-dev \ | sed -E 's/.*(librpm[[:alnum:].-]+).*/\1/')