From e68daafd88e7fec39e7e03c298c5dde089aa70e4 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 20 Jan 2016 11:32:28 +0100 Subject: [PATCH] Recursor: have buildscripts use new normal configure --- build-scripts/build-recursor-rpm | 35 ++++++++++++++++------------- build-scripts/debian-recursor/rules | 20 ++++++++++++----- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/build-scripts/build-recursor-rpm b/build-scripts/build-recursor-rpm index 07dd7193d..3612c4b5f 100755 --- a/build-scripts/build-recursor-rpm +++ b/build-scripts/build-recursor-rpm @@ -134,18 +134,21 @@ package if you need a dns cache for your network. %prep %setup -q -n pdns-recursor-${TARBALLVERSION} -sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/Makefile.in -sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/sysdeps/Linux.inc %build -%configure -LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua OPTFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" make %{?_smp_mflags} +%configure \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --libdir=%{_libdir}/%{name} \ + --disable-static \ + --disable-dependency-tracking \ + --disable-silent-rules \ + --enable-unit-tests + +make %{?_smp_mflags} %install %{__rm} -rf %{buildroot} -make install DESTDIR=%{buildroot} CONFIGDIR="%{_sysconfdir}/%{name}" -chmod 0755 %{buildroot}/%{_bindir}/rec_control -chmod 0755 %{buildroot}/%{_sbindir}/pdns_recursor +make install DESTDIR=%{buildroot} %{__install} -D -p %{SOURCE1} %{buildroot}%{_initrddir}/pdns-recursor %{buildroot}/%{_sbindir}/pdns_recursor --config > %{buildroot}%{_sysconfdir}/%{name}/recursor.conf %{__rm} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf-dist @@ -221,20 +224,22 @@ package if you need a dns cache for your network. %prep %setup -q -n pdns-recursor-${TARBALLVERSION} -sed -i -e 's!SYSCONFDIR=/etc/powerdns!SYSCONFDIR=/etc/pdns-recursor!' -e 's!STRIP_BINARIES?=1!STRIP_BINARIES?=0!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/Makefile.in -sed -i -e 's!OS_SPECIFIC_INSTALL=.*!OS_SPECIFIC_INSTALL=!' $HOME/rpmbuild/BUILD/pdns-recursor-${TARBALLVERSION}/sysdeps/Linux.inc %build -%configure -LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua OPTFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" make %{?_smp_mflags} +%configure \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --libdir=%{_libdir}/%{name} \ + --disable-static \ + --disable-dependency-tracking \ + --disable-silent-rules \ + --enable-unit-tests + +make %{?_smp_mflags} %install -make install DESTDIR=%{buildroot} CONFIGDIR="%{_sysconfdir}/%{name}" -chmod 0755 %{buildroot}/%{_bindir}/rec_control -chmod 0755 %{buildroot}/%{_sbindir}/pdns_recursor +make install DESTDIR=%{buildroot} # install systemd unit file %{__install} -D -p -m 644 contrib/systemd-pdns-recursor.service %{buildroot}%{_unitdir}/%{name}.service - %{buildroot}/%{_sbindir}/pdns_recursor --config > %{buildroot}%{_sysconfdir}/%{name}/recursor.conf %{__rm} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf-dist diff --git a/build-scripts/debian-recursor/rules b/build-scripts/debian-recursor/rules index 60ade2299..012ed493c 100755 --- a/build-scripts/debian-recursor/rules +++ b/build-scripts/debian-recursor/rules @@ -1,10 +1,5 @@ #!/usr/bin/make -f -# Enable lua -export LUA := 1 -export LUA_CPPFLAGS_CONFIG := $(shell pkg-config lua5.2 --cflags) -export LUA_LIBS_CONFIG := $(shell pkg-config lua5.2 --libs) - # Enable hardening features for daemons # Note: blhc (build log hardening check) will find these false positivies: CPPFLAGS 2 missing, LDFLAGS 1 missing export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie @@ -18,7 +13,20 @@ CXXFLAGS += -DPACKAGEVERSION='"$(version)"' # Use new build system %: - dh $@ --with systemd --parallel + dh $@ --with autoreconf --with systemd --parallel + +override_dh_auto_configure: + ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --sysconfdir=/etc/powerdns \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \ + --libexecdir='$${prefix}/lib' \ + --without-system-mbedtls \ + --enable-unit-tests override_dh_auto_install: ./pdns_recursor --config | sed \ -- 2.40.0