2007-03-29 17:19:09 +02:00
|
|
|
#
|
2011-04-12 04:25:25 +02:00
|
|
|
# spec file for package nsd
|
2007-03-29 17:19:09 +02:00
|
|
|
#
|
2011-04-12 04:25:25 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-03-29 17:19:09 +02:00
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2006-07-07 14:18:42 +02:00
|
|
|
# norootforbuild
|
|
|
|
|
2007-03-29 17:19:09 +02:00
|
|
|
Name: nsd
|
2011-04-12 04:25:25 +02:00
|
|
|
Version: 3.2.8
|
2007-03-29 17:19:09 +02:00
|
|
|
Release: 0
|
|
|
|
#
|
|
|
|
License: GPL
|
|
|
|
Group: Productivity/Networking/DNS/Servers
|
|
|
|
#
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: openssl-devel pkgconfig pwdutils tcpd-devel
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq pwdutils
|
|
|
|
#
|
2006-07-07 14:18:42 +02:00
|
|
|
%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
|
|
|
|
#
|
2007-03-29 17:19:09 +02:00
|
|
|
Url: http://open.nlnetlabs.nl/nsd/
|
2011-04-12 04:25:25 +02:00
|
|
|
Source: http://open.nlnetlabs.nl/downloads/nsd/nsd-%{version}.tar.bz2
|
2007-03-29 17:19:09 +02:00
|
|
|
Source1: %{name}.init
|
2006-07-07 14:18:42 +02:00
|
|
|
#
|
2011-04-12 04:25:25 +02:00
|
|
|
Summary: An authoritative only, high performance, simple and open source name server
|
2006-07-07 14:18:42 +02:00
|
|
|
%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 <nsd-team@nlnetlabs.nl>
|
|
|
|
|
2007-03-29 07:17:02 +02:00
|
|
|
|
2006-07-07 14:18:42 +02:00
|
|
|
%prep
|
|
|
|
%setup
|
|
|
|
|
|
|
|
%build
|
2007-03-29 07:17:02 +02:00
|
|
|
%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} \
|
2006-07-07 14:18:42 +02:00
|
|
|
--with-libwrap
|
|
|
|
%{__make}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
for i in %{buildroot}%{configdir}/*.sample ; do
|
2007-03-29 07:17:02 +02:00
|
|
|
%{__cp} -v $i ${i%%.sample} ;
|
2006-07-07 14:18:42 +02:00
|
|
|
done
|
2011-04-12 04:25:25 +02:00
|
|
|
chmod -Rv o= %{buildroot}%{configdir}/
|
2007-03-29 07:17:02 +02:00
|
|
|
#
|
2006-07-07 14:18:42 +02:00
|
|
|
%{__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}
|
2007-03-29 07:17:02 +02:00
|
|
|
#
|
2007-03-29 17:19:09 +02:00
|
|
|
%{__install} -d -m 0755 %{buildroot}/var/log/
|
|
|
|
touch %{buildroot}%{home}/{nsd.db,ixfr.db,xfrd.state} %{buildroot}/var/log/nsd.log
|
2006-07-07 14:18:42 +02:00
|
|
|
|
|
|
|
%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)
|
2007-03-29 07:17:02 +02:00
|
|
|
%doc doc/*
|
2006-07-07 14:18:42 +02:00
|
|
|
%doc contrib/
|
|
|
|
%{_sysconfdir}/init.d/%{name}
|
|
|
|
%{_sbindir}/rcnsd
|
|
|
|
%{_sbindir}/nsd
|
|
|
|
%{_sbindir}/nsd-notify
|
|
|
|
%{_sbindir}/nsd-xfer
|
|
|
|
%{_sbindir}/nsdc
|
|
|
|
%{_sbindir}/zonec
|
2007-03-29 07:17:02 +02:00
|
|
|
%{_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*
|
2011-04-12 04:25:25 +02:00
|
|
|
#
|
|
|
|
%config %attr(-,root,%{name}) %{configdir}
|
|
|
|
#
|
2007-03-29 07:17:02 +02:00
|
|
|
%dir %attr(750,%{name},%{name}) %{home}
|
|
|
|
%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
|
2011-04-12 04:25:25 +02:00
|
|
|
#
|
|
|
|
%ghost %attr(640,%{name},%{name}) /var/log/nsd.log
|
2007-03-29 07:17:02 +02:00
|
|
|
|
|
|
|
%changelog
|