]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Also build Debian bullseye packages with `meson`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 7 Mar 2025 09:57:37 +0000 (10:57 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 7 Mar 2025 16:25:09 +0000 (17:25 +0100)
builder-support/debian/dnsdist/debian-bookworm/rules
builder-support/debian/dnsdist/debian-buster/rules

index 5140f71d65e22db75e78714bae048e3534080984..f375b221a82487a4a709475484968ecb87e31a66 100755 (executable)
@@ -51,7 +51,7 @@ override_dh_auto_configure:
        PKG_CONFIG_PATH=/opt/lib/pkgconfig dh_auto_configure -- \
          --sysconfdir=/etc/dnsdist \
          -Dunit-tests=true \
-          -Db_lto=true \
+         -Db_lto=true \
          -Db_lto_mode=thin \
          -Db_pie=true \
          -Ddns-over-https=true \
index bc39c2ce6d33c9db61d5c4ccf79e199e29c06593..9d108fd3a5ed98166fab7d7f628bf51f28f7b253 100755 (executable)
@@ -8,72 +8,67 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
-# for atomic support on powerpc (automatic on mipsel)
-LDFLAGS += -latomic
-# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
-# build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
-# and the -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
-LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -ldl
-CC=clang
-CXX=clang++
-
 # Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
-CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+MESON_ARGS += -Dsystemd=enabled
 DH_ARGS += --with systemd
 else
-CONFIGURE_ARGS += --disable-systemd
+MESON_ARGS += -Dsystemd=disabled
 endif
 
 # Only disable luajit on arm64
 ifneq ($(DEB_HOST_ARCH),arm64)
-CONFIGURE_ARGS += --with-lua=luajit
+MESON_ARGS += -Dlua=luajit
 else
-CONFIGURE_ARGS += --with-lua=lua5.3
+MESON_ARGS += -Dlua=lua
 endif
 
 %:
-       dh $@ \
-         --with autoreconf \
+       dh $@ --buildsystem=meson \
          $(DH_ARGS)
 
 override_dh_auto_clean:
        rm -f dnslabeltext.cc
        dh_auto_clean
 
+# for atomic support on powerpc (automatic on mipsel)
+#LDFLAGS += -latomic
+# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
+# build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
+# and the -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
+
 override_dh_auto_configure:
-       ./configure \
-         --host=$(DEB_HOST_GNU_TYPE) \
-         --build=$(DEB_BUILD_GNU_TYPE) \
-         --prefix=/usr \
+       LDFLAGS="-latomic -fuse-ld=lld -Wl,--build-id=sha1 -ldl" \
+       CC=clang \
+       CXX=clang++ \
+       PKG_CONFIG_PATH=/opt/lib/pkgconfig dh_auto_configure -- \
          --sysconfdir=/etc/dnsdist \
-         --mandir=\$${prefix}/share/man \
-         --infodir=\$${prefix}/share/info \
-         --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \
-         --libexecdir='$${prefix}/lib' \
-         --enable-lto=thin \
-         --enable-dns-over-https \
-         --enable-dns-over-quic \
-         --enable-dns-over-http3 \
-         --enable-dns-over-tls \
-         --enable-dnscrypt \
-         --enable-dnstap \
-         --enable-yaml \
-         --with-ebpf \
-         --with-gnutls \
-         --with-h2o \
-         --with-net-snmp \
-         --with-libcap \
-         --with-libsodium \
-         --with-quiche \
-         --with-re2 \
-         --with-service-user='_dnsdist' \
-         --with-service-group='_dnsdist' \
-         $(CONFIGURE_ARGS) \
-         PKG_CONFIG_PATH=/opt/lib/pkgconfig
+         -Dunit-tests=true \
+         -Db_lto=true \
+         -Db_lto_mode=thin \
+         -Db_pie=true \
+         -Ddns-over-https=true \
+         -Ddns-over-quic=true \
+         -Ddns-over-http3=true \
+         -Ddns-over-tls=true \
+         -Ddnscrypt=enabled \
+         -Ddnstap=enabled \
+         -Dyaml=enabled \
+         -Debpf=enabled \
+         -Dyaml=enabled \
+         -Dtls-gnutls=enabled \
+         -Dsnmp=true \
+         -Dlibcap=enabled \
+         -Dlibsodium=enabled \
+         -Dquiche=enabled \
+         -Dre2=enabled \
+         -Dsystemd-service-user='_dnsdist' \
+         -Dsystemd-service-group='_dnsdist' \
+         -Dxsk=disabled \
+         $(MESON_ARGS)
 
 override_dh_auto_build-arch:
-       dh_auto_build -- V=1
+       dh_auto_build
 
 override_dh_install:
        dh_auto_install