fi
-# libsodium is not available on all RPM platforms (like CentOS 7)
-SODIUM_BUILDREQUIRES=''
-SODIUM_CONFIGURE=''
-
# Some RPM platforms use systemd, others sysv, we default to systemd here
INIT_BUILDREQUIRES='BuildRequires: systemd-devel'
INIT_INSTALL='sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/lib/systemd/system/dnsdist.service'
# CentOS 6 has protobuf, but not a modern enough boost. We defaul to with protobuf
PROTOBUF_CONFIGURE='--with-protobuf \'
+# CentOS 6 has a libsodium, but we use more modern functions
+SODIUM_BUILDREQUIRES='BuildRequires: libsodium-devel'
+SODIUM_CONFIGURE='--enable-libsodium \'
+DNSCRYPT_CONFIGURE='--enable-dnscrypt \'
+
# These two are the same for sysv and systemd (we don't install defaults files at the moment)
DEFAULTS_INSTALL=''
DEFAULTS_FILES=''
if [ -f /etc/redhat-release ]; then
OS="$(cat /etc/redhat-release)"
case "$OS" in
- Fedora\ *\ 21*)
- SODIUM_BUILDREQUIRES='BuildRequires: libsodium-devel'
- SODIUM_CONFIGURE='--enable-libsodium'
- ;;
CentOS\ *\ 6*)
INIT_BUILDREQUIRES=''
INIT_INSTALL='install -d -m 755 %{buildroot}/%{_initrddir} && install -m 755 contrib/dnsdist.init.centos6 %{buildroot}/%{_initrddir}/dnsdist'
INIT_FILES='%{_initrddir}/dnsdist'
INIT_CONFIGURE='\'
PROTOBUF_CONFIGURE='--without-protobuf \'
+ SODIUM_BUILDREQUIRES=''
+ SODIUM_CONFIGURE='--disable-libsodium \'
+ DNSCRYPT_CONFIGURE='--disable-dnscrypt \'
SETUP="%setup -n %{name}-${TARBALLVERSION}"
RPMBUILD_COMMAND="scl enable devtoolset-3 -- ${RPMBUILD_COMMAND}"
;;
Group: System/DNS
Source: dnsdist-${TARBALLVERSION}.tar.bz2
Requires(pre): shadow-utils
-BuildRequires: readline-devel
BuildRequires: boost-devel
BuildRequires: lua-devel
-BuildRequires: protobuf-devel
BuildRequires: protobuf-compiler
+BuildRequires: protobuf-devel
+BuildRequires: re2-devel
+BuildRequires: readline-devel
${SODIUM_BUILDREQUIRES}
${INIT_BUILDREQUIRES}
%build
%configure \
--sysconfdir=/etc/dnsdist \
+ --enable-re2 \
+ ${SODIUM_CONFIGURE}
+ ${DNSCRYPT_CONFIGURE}
${INIT_CONFIGURE}
${PROTOBUF_CONFIGURE}
- ${SODIUM_CONFIGURE}
make
Priority: optional
Maintainer: PowerDNS Autobuilder <powerdns.support@powerdns.com>
Origin: PowerDNS
-Build-Depends: debhelper (>= 9), dh-autoreconf, dh-systemd (>= 1.5), libboost-dev, libedit-dev, liblua5.2-dev, protobuf-compiler, libprotobuf-def, pkg-config @LIBSODIUMDEV@ @LIBSYSTEMDDEV@
+Build-Depends: debhelper (>= 9), dh-autoreconf, dh-systemd (>= 1.5), libboost-dev, libedit-dev, liblua5.2-dev, protobuf-compiler, libprotobuf-def, pkg-config @LIBRE2DEV@ @LIBSODIUMDEV@ @LIBSYSTEMDDEV@
Standards-Version: 3.9.7
Homepage: http://dnsdist.org
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
-ENABLE_LIBSODIUM := --enable-libsodium
+ENABLE_LIBSODIUM := --enable-libsodium --enable-dnscrypt
LIBSODIUM_DEV := , libsodium-dev
ENABLE_SYSTEMD := --enable-systemd --with-systemd=/lib/systemd/system
LIBSYSTEMD_DEV := , libsystemd-dev
DEBHELPER_WITH_SYSTEMD := --with systemd
+ENABLE_RE2 := --enable-re2
+LIBRE2_DEV := , libre2-dev
+
# $(ID) and $(VERSION_ID) come from the environment, source this from /etc/os-release
ifeq ($(ID), ubuntu)
ifeq ($(VERSION_ID), 14.04)
LIBSYSTEMD_DEV=
LIBSODIUM_DEV=
DEBHELPER_WITH_SYSTEMD=
+ ENABLE_RE2=
+ LIBRE2_DEV=
endif
endif
debian/control: debian/control.in
sed -e "s!@LIBSODIUMDEV@!$(LIBSODIUM_DEV)!" \
- -e "s!@LIBSYSTEMDDEV@!$(LIBSYSTEMD_DEV)!" $< > $@
+ -e "s!@LIBSYSTEMDDEV@!$(LIBSYSTEMD_DEV)!" \
+ -e "s!@LIBRE2DEV@!$(LIBRE2_DEV)!" $< > $@
%:
dh $@ \
--libexecdir='$${prefix}/lib' \
--with-protobuf=yes \
$(ENABLE_SYSTEMD) \
+ $(ENABLE_RE2) \
$(ENABLE_LIBSODIUM)
override_dh_auto_build-arch: