fea33a3
Summary: NSD is a complete implementation of an authoritative DNS name server
fea33a3
Name: nsd
2979b81
Version: 2.3.6
2979b81
Release: 1%{?dist}
fea33a3
License: BSD-like
fea33a3
Url: http://open.nlnetlabs.nl/nsd/
fea33a3
Source: http://open.nlnetlabs.nl/downloads/nsd/%{name}-%{version}.tar.gz
fea33a3
Source1: nsd.init
fea33a3
Group: System Environment/Daemons
fea33a3
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0fb8b47
BuildRequires: flex, openssl-devel
fea33a3
fea33a3
%description
fea33a3
NSD is a complete implementation of an authoritative DNS name server.
fea33a3
For further information about what NSD is and what NSD is not please
fea33a3
consult the REQUIREMENTS document which is a part of this distribution
fea33a3
(thanks to Olaf).
fea33a3
fea33a3
%prep
fea33a3
%setup -q 
fea33a3
c025ce8
%configure --enable-bind8-stats --enable-plugins --enable-checking \
1f3f193
           --enable-mmap --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \
fea33a3
           --with-user=nsd
fea33a3
fea33a3
%build
fea33a3
%{__make} %{?_smp_mflags}
fea33a3
fea33a3
%install
e39af5e
rm -rf %{buildroot}
c025ce8
%{__make} DESTDIR=%{buildroot} install
c025ce8
install -d 0755 %{buildroot}%{_initrddir}
fea33a3
install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
c025ce8
install -d 0700 %{buildroot}%{_localstatedir}/run/%{name}
fea33a3
c025ce8
# change .sample to normal config files
c025ce8
mv %{buildroot}%{_sysconfdir}/nsd/nsdc.conf.sample \
c025ce8
   %{buildroot}%{_sysconfdir}/nsd/nsdc.conf
c025ce8
mv %{buildroot}%{_sysconfdir}/nsd/nsd.zones.sample \
c025ce8
   %{buildroot}%{_sysconfdir}/nsd/nsd.zones
fea33a3
fea33a3
%clean
fea33a3
rm -rf ${RPM_BUILD_ROOT}
fea33a3
fea33a3
%files 
e39af5e
%defattr(-,root,root,-)
232bfb4
%doc README LICENSE NSD-DATABASE DIFFERENCES TODO RELNOTES REQUIREMENTS
fea33a3
%dir %{_sysconfdir}/nsd/
fea33a3
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsdc.conf
fea33a3
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
fea33a3
%attr(0755,root,root) %{_initrddir}/%{name}
1f3f193
%attr(0700,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
fea33a3
%{_sbindir}/*
fea33a3
%{_mandir}/*/*
fea33a3
fea33a3
%pre
fea33a3
if getent passwd nsd >/dev/null 2>&1 ; then : ; else /usr/sbin/useradd -d /etc/nsd -r -s /sbin/nologin nsd >/dev/null 2>&1 || exit 1 ; fi
fea33a3
# "Everyone is doing it, so why can't we?" 
fea33a3
exit 0
fea33a3
fea33a3
%post
e39af5e
/sbin/chkconfig --add %{name}
fea33a3
fea33a3
%preun
e39af5e
if [ $1 -eq 0 ]; then
2979b81
  echo " preun "
2979b81
        /sbin/service %{name} stop 
e39af5e
        /sbin/chkconfig --del %{name} 
fea33a3
fi
fea33a3
fea33a3
%postun
fea33a3
if [ "$1" -ge "1" ]; then
2979b81
  /sbin/service %{name} condrestart 
fea33a3
fi
fea33a3
fea33a3
%changelog
2979b81
* Thu Oct 12 2006  Paul Wouters <paul@xelerance.com> 2.3.6-1
2979b81
- Upgraded to 2.3.6
2979b81
- Removed obsolete workaround in nsd.init
2979b81
- Fixed spec file so daemon gets properly restarted on upgrade
2979b81
232bfb4
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 2.3.5-4
232bfb4
- Rebuild requested for PT_GNU_HASH support from gcc
232bfb4
- Removed dbaccess.c from doc section
232bfb4
c2f0858
* Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-3
c2f0858
- Bump version for FC-x upgrade path
c2f0858
c2f0858
* Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-1
788b255
- Upgraded to nsd-2.3.5
788b255
babe51a
* Sun May  7 2006 Paul Wouters <paul@xelerance.com> - 2.3.4-3
c025ce8
- Upgraded to nsd-2.3.4. 
c025ce8
- Removed manual install targets because DESTDIR is now supported
c025ce8
- Re-enabled --checking, checking patch no longer needed and removed.
c025ce8
- Work around in nsd.init for nsd failing to start when there is no ipv6
c025ce8
e39af5e
* Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-7
e39af5e
- chkconfig and attribute  changes as proposed by Dmitry Butskoy
e39af5e
1f3f193
* Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-6
1f3f193
- Moved pid file to /var/run/nsd/nsd.pid.
1f3f193
- Use %{_localstatedir} instead of "/var"
1f3f193
c98708c
* Tue Dec 13 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-5
c98708c
- Added BuildRequires for openssl-devel, removed Requires for openssl.
c98708c
c98708c
* Mon Dec 12 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-4
fea33a3
- upgraded to nsd-2.3.3
fea33a3
fea33a3
* Wed Dec  7 2005 Tom "spot" Callaway <tcallawa@redhat.com> - 2.3.2-2
fea33a3
- minor cleanups
fea33a3
fea33a3
* Mon Dec  5 2005 Paul Wouters <paul@xelerance.com> - 2.3.2-1
fea33a3
- Upgraded to 2.3.2. Changed post scripts to comply to Fedora
fea33a3
  Extras policies (eg do not start daemon on fresh install)
fea33a3
fea33a3
* Tue Oct  4 2005 Paul Wouters <paul@xelerance.com> - 2.3.1-1
fea33a3
- Initial version