Skip to content

Commit

Permalink
Merge remote-tracking branch 'knx/debian' into debian
Browse files Browse the repository at this point in the history
  • Loading branch information
smurfix committed Dec 30, 2024
2 parents c216ccf + 15523f7 commit 38bef16
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ Source: knxd
Section: net
Priority: optional
Maintainer: Matthias Urlichs <[email protected]>
Build-Depends: debhelper (>= 13), debhelper-compat (=13),
Build-Depends: debhelper-compat (=13),
autoconf, automake, libtool,
git,
libusb-1.0-0-dev (>= 1.0.9),
pkgconf | pkg-config,
libsystemd-dev (>= 228) | libsystemd-daemon-dev (>= 200) | base-files (<< 8),
systemd-dev | systemd,
libev-dev,
libfmt-dev | libfmt3-dev | cmake (>= 2.8.12),
libfmt-dev | libfmt3-dev | git,
Expand Down
4 changes: 3 additions & 1 deletion debian/knxd.install.systemd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
etc/knxd.conf
lib/systemd/system/knxd-net.socket
${env:deb_systemdsystemunitdir}/knxd.service
${env:deb_systemdsystemunitdir}/knxd.socket
${env:deb_systemdsystemunitdir}/knxd-net.socket
usr/lib/sysusers.d
3 changes: 3 additions & 0 deletions debian/not-installed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/bin/findknxusb
usr/lib/${DEB_HOST_MULTIARCH}/libeibclient.a
usr/lib/${DEB_HOST_MULTIARCH}/libeibclient.la
33 changes: 20 additions & 13 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all


# This has to be exported to make some magic below work.
export DH_OPTIONS

# For backwards compatibility to <= Bookworm, can be removed when Trixie is the minimum supported release, also update knxd.install.systemd then
export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)

%:
dh $@
dh $@

override_dh_clean:
dh_clean
rm -f debian/knxd.install
rm -f debian/knxd.service
rm -f debian/knxd.socket
rm -f debian/knxd-net.socket
rm -f debian/knxd.udev

override_dh_auto_configure: configure install-sh
Expand All @@ -23,27 +28,29 @@ override_dh_auto_configure: configure install-sh
configure install-sh: configure.ac
sh bootstrap.sh

override_dh_install: debian/knxd.install debian/knxd.socket debian/knxd-net.socket debian/knxd.service debian/knxd.udev
override_dh_install: debian/knxd.install debian/knxd.service debian/knxd.socket debian/knxd-net.socket debian/knxd.udev
dh_install
dh_systemd_enable || true
dh_systemd_start || true

override_dh_installsystemd:
dh_installsystemd -pknxd knxd.service knxd.socket knxd-net.socket
dh_installsystemd --remaining-packages

override_dh_compress:
dh_compress -X.rst

debian/knxd.install: debian/knxd.install.in
cp $^ $@
debian/knxd.install: debian/knxd.install.in debian/knxd.install.systemd
cp $@.in $@
grep -qs 'HAVE_SYSTEMD_TRUE.*#' config.status || cat $@.systemd >> $@

debian/knxd.udev: systemd/knxd.udev
debian/knxd.service: systemd/knxd.service
cp $^ $@

debian/knxd.socket: systemd/knxd.socket
test -e $^ && cp $^ $@
cp $^ $@
debian/knxd-net.socket: systemd/knxd-net.socket
test -e $^ && cp $^ $@
debian/knxd.service: systemd/knxd.service
test -e $^ && cp $^ $@
cp $^ $@
debian/knxd.udev: systemd/knxd.udev
cp $^ $@

systemd/knxd.socket systemd/knxd-net.socket systemd/knxd.service:
$(MAKE) -C systemd

Expand Down
3 changes: 1 addition & 2 deletions install-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ cd ..
sudo dpkg -i knxd_*.deb knxd-tools_*.deb

: 5 Clean up. Optional. Remove this if you want to rebuild soon-ish.
sudo apt remove --autoremove knxd-build-deps --yes

sudo apt-get remove --autoremove knxd-build-deps --yes

0 comments on commit 38bef16

Please sign in to comment.