# norootforbuild %define home %{_var}/lib/%{name} %define configdir %{_sysconfdir}/%{name} %define configfile %{configdir}/nsdc.conf %define zonesfile %{configdir}/nsd.zones %define zonesdir %{configdir}/ %define dbfile %{zonesdir}/nsd.db # Name: nsd Version: 2.3.5 Release: 2 # License: GPL Group: Productivity/Networking/DNS/Servers # BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: openssl-devel pkgconfig tcpd-devel PreReq: %insserv_prereq %fillup_prereq # URL: http://open.nlnetlabs.nl/nsd/ Source: http://www.nlnetlabs.nl/downloads/nsd/nsd-%{version}.tar.gz Source1: %{name}.init Patch: nsd-2.3.3_ldflags.patch Patch1: nsd-2.3.3_implicit_declaration.patch # Summary: NSD is an authoritative only, high performance, simple and open source name server. %description NSD is a complete implementation of an authoritative DNS name server. For further information about what NSD is and what NSD is not please consult the REQUIREMENTS document which is a part of this distribution (thanks to Olaf). Authors: -------- NSD team %prep %setup %patch %patch1 %build autoreconf -fi %configure \ --with-dbfile=%{home}/nsd.db \ --enable-root-server \ --enable-plugins \ --enable-bind8-stats \ --enable-checking \ --enable-mmap \ --with-user=%{name} \ --with-libwrap %{__make} %install %makeinstall for i in %{buildroot}%{configdir}/*.sample ; do %{__cp} $i ${i%%.sample} ; done %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} %{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} %{__install} -Dd -m 0755 %{buildroot}%{home} %clean %{__rm} -rf %{buildroot}; %pre # # e.g. adding user # %{_sbindir}/groupadd -r %{name} &>/dev/null ||: %{_sbindir}/useradd -o -g %{name} -s /bin/false -r -c "user for %{name}" -d %{home} %{name} &>/dev/null ||: %post %fillup_and_insserv %{name} %preun %stop_on_removal %{name} %postun %restart_on_update %{name} %{insserv_cleanup} %files %defattr(-,root,root) %doc CREDITS DIFFERENCES LICENSE NSD-DATABASE README README.icc RELNOTES REQUIREMENTS TODO %doc contrib/ %{_sysconfdir}/init.d/%{name} %{_sbindir}/rcnsd %{_sbindir}/nsd %{_sbindir}/nsd-notify %{_sbindir}/nsd-xfer %{_sbindir}/nsdc %{_sbindir}/zonec %{_mandir}/man8/nsd-notify.8.gz %{_mandir}/man8/nsd-xfer.8.gz %{_mandir}/man8/nsd.8.gz %{_mandir}/man8/nsdc.8.gz %{_mandir}/man8/zonec.8.gz %dir %attr(750,root,%{name}) %{home} %dir %attr(750,root,%{name}) %{configdir} %attr(640,root,%{name}) %{configdir}/*.sample %config(noreplace) %attr(640,root,%{name}) %{configdir}/nsdc.conf %config(noreplace) %attr(640,root,%{name}) %{configdir}/nsd.zones