Preliminary systemd support:
authorgregor herrmann <gregoa@debian.org>
Sun, 5 Oct 2014 13:12:24 +0000 (15:12 +0200)
committergregor herrmann <gregoa@debian.org>
Sun, 5 Oct 2014 13:25:48 +0000 (15:25 +0200)
- build-depend on libsystemd-dev package on linux-any
- add patch 0001-osflags-use-pkg-config-for-systemd-support.patch from
  upstream git to use pkg-config for finding the systemd libs; change
  libsystemd-daemon to libsystemd

debian/control
debian/patches/0001-osflags-use-pkg-config-for-systemd-support.patch [new file with mode: 0644]
debian/patches/series

index 92b0982455366530eb3b1fed9659eb5afb96effd..0860d695a0cbcc3e55500b93d49218faabfd22e2 100644 (file)
@@ -7,6 +7,7 @@ Build-Depends: check (>= 0.9.10-3),
                debhelper (>= 9),
                dpkg-dev (>= 1.16.1),
                help2man,
                debhelper (>= 9),
                dpkg-dev (>= 1.16.1),
                help2man,
+               libsystemd-dev [linux-any],
                pkg-config,
                po-debconf,
                zlib1g-dev
                pkg-config,
                po-debconf,
                zlib1g-dev
diff --git a/debian/patches/0001-osflags-use-pkg-config-for-systemd-support.patch b/debian/patches/0001-osflags-use-pkg-config-for-systemd-support.patch
new file mode 100644 (file)
index 0000000..6f759f1
--- /dev/null
@@ -0,0 +1,34 @@
+From cc4bc22447d15deacf44bc1d369621a63c934427 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Fri, 25 Jul 2014 02:02:48 +0200
+Subject: [PATCH] osflags: use pkg-config for systemd support
+
+Recent versions of systemd don't ship with libsystemd-daemon.so anymore,
+but instead use libsystemd.so for everything. This is obviously
+problematic for using the same LDFLAGS on old systemd and new systemd.
+So, they also ship compatability pkgconfig files, which use the old
+names but return the new library. So, the most portable way to support
+both old and new systemd is to use pkgconfig. It's not a problem either,
+since systems that use systemd are bound to also have pkgconfig
+installed.
+
+---
+
+Change libsystemd-daemon to libsystemd.
+
+diff --git a/src/osflags b/src/osflags
+index 9eda8f0..0f8a26c 100755
+--- a/src/osflags
++++ b/src/osflags
+@@ -19,7 +19,7 @@ link)
+               Linux)
+                       FLAGS="";
+                       [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
+-                      [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
++                      [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS $(pkg-config --libs libsystemd)";
+                       echo $FLAGS;
+               ;;
+       esac
+-- 
+2.1.1
+
index fa9c1fe20a2b535d1b047bfb36505fae4ecd9b40..1294a4f0c6331502d54c171d7201d1623b3529cd 100644 (file)
@@ -1,2 +1,3 @@
 cflags.patch
 verbose-build.patch
 cflags.patch
 verbose-build.patch
+0001-osflags-use-pkg-config-for-systemd-support.patch