Priority: optional
Maintainer: PowerDNS Autobuilder <powerdns.support@powerdns.com>
Origin: PowerDNS
-Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), autotools-dev, libboost-dev, liblua5.2-dev, libsodium-dev
+Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), autotools-dev, libboost-dev, liblua5.2-dev @LIBSODIUMDEV@
Standards-Version: 3.9.5
Homepage: http://dnsdist.org
--- /dev/null
+description "dnsdist - A powerful DNS loadbalancer"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+author "Pieter Lexis <pieter.lexis@powerdns.com>"
+
+# Keep the --supervised option when modifying this
+exec /usr/bin/dnsdist --supervised -l 127.0.0.1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
+ENABLE_LIBSODIUM := --enable-libsodium
+LIBSODIUM_DEV := , libsodium-dev
+DEBHELPER_WITH_SYSTEMD := --with systemd
+
+# $(ID) and $(VERSION_ID) come from the environment, source this from /etc/os-release
+ifeq ($(ID), ubuntu)
+ ifeq ($(VERSION_ID), 14.04)
+ # Disable building and depending on libsodium on Ubuntu Trusty
+ ENABLE_LIBSODIUM=
+ LIBSODIUM_DEV=
+ DEBHELPER_WITH_SYSTEMD=
+ endif
+endif
+
+debian/control: debian/control.in
+ sed -E "s!@LIBSODIUMDEV@!$(LIBSODIUM_DEV)!" $< > $@
+
%:
dh $@ \
--with autotools-dev \
--parallel \
- --with systemd
+ $(DEBHELPER_WITH_SYSTEMD)
override_dh_auto_configure:
./configure \
--infodir=\$${prefix}/share/info \
--libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \
--libexecdir='$${prefix}/lib' \
- --enable-libsodium
+ $(ENABLE_LIBSODIUM)
override_dh_strip:
dh_strip --dbg-package=dnsdist-dbg