%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
%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
#!/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
# 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 \