diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-08-24 11:24:57 +0200 |
---|---|---|
committer | daniel <dwillmann@sysmocom.de> | 2023-08-24 15:24:33 +0000 |
commit | e486e012c8a9eddfedadd98f48161128287b0d6d (patch) | |
tree | 5156e8f207f99ea76afcbd861de26b9cbbf00545 | |
parent | 012d9044a224fd65908d52cd3e0359a868cda3eb (diff) |
debian: depend on liburing-dev for debian >= 11
Prepare for the io_uring backend, by conditionally depending on
liburing-dev on debian >= 11 based distributions. On debian 10 based
distributions, set --disable-uring as configure flag.
Closes: OS#6143
Related: https://askubuntu.com/a/761943
Change-Id: If7832baec0bddbe0bbbbfe07f77bba3deb328d5c
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | debian/rules | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/debian/control b/debian/control index b5b357f8..1f1975e9 100644 --- a/debian/control +++ b/debian/control @@ -19,6 +19,7 @@ Build-Depends: debhelper (>= 10), libusb-1.0-0-dev, libmnl-dev, libsystemd-dev, + base-files (<< 11) | liburing-dev, python3:native Standards-Version: 3.9.8 Vcs-Git: https://gitea.osmocom.org/osmocom/libosmocore diff --git a/debian/rules b/debian/rules index 91d56789..efa5adcd 100755 --- a/debian/rules +++ b/debian/rules @@ -25,8 +25,19 @@ override_dh_install: override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) +# Set --disable-uring for debian < 11 based distributions override_dh_auto_configure: - dh_auto_configure -- --enable-static --disable-sctp-tests --enable-systemd-logging + set -x && \ + CONFIGURE_FLAGS=" \ + --disable-sctp-tests \ + --enable-static \ + --enable-systemd-logging \ + "; \ + base_ver="$$(dpkg -l base-files | grep "^ii" | awk '{print $$3}')"; \ + if dpkg --compare-versions "$$base_ver" lt 11; then \ + CONFIGURE_FLAGS="$$CONFIGURE_FLAGS --disable-uring"; \ + fi; \ + dh_auto_configure -- $$CONFIGURE_FLAGS override_dh_clean: dh_clean |