]> granicus.if.org Git - pdns/commitdiff
Recursor: have buildscripts use new normal configure
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 20 Jan 2016 10:32:28 +0000 (11:32 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 20 Jan 2016 10:34:15 +0000 (11:34 +0100)
build-scripts/build-recursor-rpm
build-scripts/debian-recursor/rules

index 07dd7193d66e2e1858d2772617caecf960148ad0..3612c4b5f60a5f61186772e7ddcd1b62e0350f9f 100755 (executable)
@@ -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
 
index 60ade2299f265c90f144f828fa37b2c5455f61cc..012ed493c62fdbd4871abd7c43e9b5347641cec0 100755 (executable)
@@ -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 \