d881bde
Summary:		Modern, advanced and high performance recursing/non authoritative nameserver
d881bde
Name:			pdns-recursor
f212838
Version:		3.1.7
0a679f7
Release:		3%{?dist}
d881bde
Group:			System Environment/Daemons
24f28a2
License:		GPLv2
d881bde
URL:			http://powerdns.com
d881bde
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2e24e8e
Source0:		http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
d881bde
Source1:		pdns-recursor.init	
d881bde
d881bde
Patch0:			pdns-recursor-fixsysconfdir.patch
d881bde
Patch1:			pdns-recursor-fixmakefile.patch
d881bde
d881bde
Provides:		powerdns-recursor = %{version}-%{release}
f212838
BuildRequires:		boost-devel, lua-devel
d881bde
Requires(post):		/sbin/chkconfig
d881bde
Requires(preun):	/sbin/chkconfig, /sbin/service
d881bde
d881bde
%description
d881bde
PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
d881bde
package if you need a dns cache for your network.
d881bde
d881bde
%prep
98739e3
%setup -q
d881bde
%patch0 -p1 -b .fixsysconfdir
d881bde
%patch1 -p1 -b .fixmakefile
d881bde
d881bde
%build
71c1e48
#LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua make %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
71c1e48
LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua OPTFLAGS="%{optflags}" make %{?_smp_mflags}
71c1e48
d881bde
d881bde
%install
d881bde
%{__rm} -rf %{buildroot}
d881bde
make install DESTDIR=%{buildroot} CONFIGDIR="%{_sysconfdir}/%{name}"
d881bde
%{__install} -D -p %{SOURCE1} %{buildroot}%{_initrddir}/pdns-recursor
d881bde
d881bde
%{__mv} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf{-dist,}
d881bde
d881bde
# add pdns user and group to top of configfile
d881bde
sed -i '1i\setuid=pdns-recursor' %{buildroot}%{_sysconfdir}/%{name}/recursor.conf
d881bde
sed -i '2i\setgid=pdns-recursor' %{buildroot}%{_sysconfdir}/%{name}/recursor.conf
d881bde
d881bde
%post
d881bde
if [ $1 -eq 1 ]; then
d881bde
	/sbin/chkconfig --add %{name}
d881bde
	userid=`id -u pdns-recursor 2>/dev/null`
d881bde
	if [ x"$userid" = x ]; then
d881bde
		%{_sbindir}/useradd -c "PowerDNS Recursor user" -s /sbin/nologin -r -d / pdns-recursor >/dev/null 2>&1 || :
d881bde
	fi
d881bde
fi
d881bde
%preun
d881bde
if [ $1 -eq 0 ]; then
d881bde
	/sbin/service %{name} stop >/dev/null 2>&1 || :
d881bde
	/sbin/chkconfig --del %{name}
d881bde
fi
d881bde
d881bde
%postun
d881bde
if [ $1 -ge 1 ]; then
d881bde
	/sbin/service %{name} condrestart >/dev/null 2>&1 || :
d881bde
fi
d881bde
d881bde
%clean
d881bde
%{__rm} -rf %{buildroot}
d881bde
d881bde
%files
d881bde
%defattr(-,root,root,-)
d881bde
%{_bindir}/rec_control
d881bde
%{_sbindir}/pdns_recursor
d881bde
%{_mandir}/man1/pdns_recursor.1.gz
d881bde
%{_mandir}/man1/rec_control.1.gz
d881bde
%{_initrddir}/pdns-recursor
d881bde
%dir %{_sysconfdir}/%{name}
d881bde
%config(noreplace) %{_sysconfdir}/%{name}/recursor.conf
d881bde
%doc COPYING README
d881bde
d881bde
d881bde
%changelog
0a679f7
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.7-3
0a679f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0a679f7
ffb8f07
* Thu Jul 24 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.7-2
71c1e48
- Use OPTFLAGS because CXXFLAGS overrides the defaults
71c1e48
ffb8f07
* Thu Jul 24 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.7-1
f212838
- Upstream released new version, now with Lua support
f212838
2e24e8e
* Sun May 11 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.6
2e24e8e
- Upstream released new version
2e24e8e
98739e3
* Wed Apr 02 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.5
98739e3
- Upstream released new version
98739e3
29717c5
* Sat Feb 16 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.5-0.1.snapshot4
29717c5
- Snapshot 4
29717c5
- Drop gcc 4.3 patch, fixed upstream
29717c5
24f28a2
* Sat Feb 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1.5-0.1.snapshot3
24f28a2
- Sync with upstream
24f28a2
- Compile fixes for gcc43
24f28a2
2d12181
* Sun Jan 27 2007 <ruben@rubenkerkhof.com> 3.1.4-4
2d12181
- Now really fix the description in init script
d881bde
* Sat Jan 27 2007 <ruben@rubenkerkhof.com> 3.1.4-3
d881bde
- Fixed Description in init script
d881bde
* Wed Jan 24 2007 <ruben@rubenkerkhof.com> 3.1.4-2
d881bde
- Fixes per bz review 221188:
d881bde
- Changed user to pdns-recursor
d881bde
- Patched the Makefile to not strip debugsymbols
d881bde
- Skipped the configure step, it didn't do much
d881bde
- Added a more Fedora-centric initscript
d881bde
- Use condrestart instead of restart in %%postun
d881bde
* Sun Dec 31 2006 <ruben@rubenkerkhof.com> 3.1.4-1
d881bde
- Initial import
d881bde