# 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: 3.0.5 Release: 0 # 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://open.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 %debug_package %prep %setup #%patch #%patch1 %build #autoreconf -fi %configure \ --with-zonesdir=%{configdir} \ --with-dbfile=%{home}/nsd.db \ --with-difffile=%{home}/ixfr.db \ --with-xfrdfile=%{home}/xfrd.state \ --enable-root-server \ --enable-plugins \ --enable-bind8-stats \ --enable-nsec3 \ --enable-nsid \ --enable-mmap \ --with-user=%{name} \ --with-libwrap %{__make} %install %makeinstall for i in %{buildroot}%{configdir}/*.sample ; do %{__cp} -v $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} # touch %{buildroot}%{home}/{nsd.db,ixfr.db,xfrd.state} %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 doc/* %doc contrib/ %{_sysconfdir}/init.d/%{name} %{_sbindir}/rcnsd %{_sbindir}/nsd %{_sbindir}/nsd-notify %{_sbindir}/nsd-xfer %{_sbindir}/nsdc %{_sbindir}/zonec %{_sbindir}/nsd-checkconf %{_sbindir}/nsd-patch %{_mandir}/man5/nsd.conf.5* %{_mandir}/man8/nsd-checkconf.8* %{_mandir}/man8/nsd-patch.8* %{_mandir}/man8/nsd-notify.8* %{_mandir}/man8/nsd-xfer.8* %{_mandir}/man8/nsd.8* %{_mandir}/man8/nsdc.8* %{_mandir}/man8/zonec.8* %dir %attr(750,%{name},%{name}) %{home} %dir %attr(750,root,%{name}) %{configdir} %config(noreplace) %attr(640,root,%{name}) %{configdir}/nsd.conf %ghost %config %attr(640,%{name},%{name}) %{home}/nsd.db %ghost %config %attr(640,%{name},%{name}) %{home}/ixfr.db %ghost %config %attr(640,%{name},%{name}) %{home}/xfrd.state %attr(640,root,%{name}) %{configdir}/*.sample %changelog