Please find the patch attached.

Chris
>From 51f670a28a3790bc903c15affd5501c8f3552c95 Mon Sep 17 00:00:00 2001
From: Chris Hofstaedtler <z...@debian.org>
Date: Wed, 20 Dec 2023 22:53:15 +0100
Subject: [PATCH 1/2] Use pkg-config to place systemd service definition

---
 debian/control       | 1 +
 debian/lldpd.install | 2 +-
 debian/rules         | 4 +++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 0d1422c..17d3e5a 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends: debhelper-compat (= 13),
                libcap-dev,
                pkg-config,
                check,
+               systemd-dev,
 Standards-Version: 4.1.1
 Vcs-Browser: https://salsa.debian.org/debian/lldpd
 Vcs-Git: https://salsa.debian.org/debian/lldpd.git
diff --git a/debian/lldpd.install b/debian/lldpd.install
index 226cc73..6f5bfb3 100644
--- a/debian/lldpd.install
+++ b/debian/lldpd.install
@@ -1,4 +1,4 @@
-debian/tmp/lib/systemd/system/lldpd.service 
+debian/tmp${env:deb_systemdsystemunitdir}/lldpd.service
 debian/tmp/usr/lib/*/*.so.*
 debian/tmp/usr/share/man/man8/*
 debian/tmp/usr/sbin/lldp*
diff --git a/debian/rules b/debian/rules
index de4a84f..d818e34 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export deb_systemdsystemunitdir=$(shell pkg-config --variable=systemdsystemunitdir systemd)
+
 %:
 	dh $@
 
@@ -8,4 +10,4 @@ override_dh_auto_configure:
 		--enable-pie \
 		--with-snmp \
 		--with-xml \
-		--with-systemdsystemunitdir=/lib/systemd/system
+		--with-systemdsystemunitdir=$(deb_systemdsystemunitdir)
-- 
2.39.2

Reply via email to