Summary(pl): DJB DNS
Name: djbdns
Version: 1.05
-Release: 2
+Release: 3
License: GPL
Group: Networking/Daemons
Group(de): Netzwerkwesen/Server
Source1: %{name}-doc.tar.gz
Patch0: dnscache-1.05-multiple-ip.patch
URL: http://cr.yp.to/djbdns.html
+Requires: daemontools
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
DJB DNS Tools.
+This is DNS server with security in mind. If you find a security hole
+you can get a prize.
%description -l pl
Narzêdzia DJB do obs³ugi DNS.
+Jest to alternatywny server DNS'u, którego g³ównym celem jest bezpieczeñstwo.
+Za znalezienie dziury w tym programie zosta³a wyznaczona nawet nagroda.
%prep
-%setup -q
+%setup -q -a1
%patch0 -p1
-tar zxf %{SOURCE1}
cd doc
ln -s merge/djbdns/* .
%build
echo %{__cc} %{rpmcflags} >conf-cc
-echo /usr >conf-home
+echo %{_prefix} > conf-home
%{__make}
%install
install walldns $RPM_BUILD_ROOT%{_bindir}
install walldns-conf $RPM_BUILD_ROOT%{_bindir}
-gzip -9nf CHANGES README SYSDEPS TARGETS TODO VERSION MULTIPLEIP
+gzip -9nf CHANGES TODO MULTIPLEIP TINYDNS
+
+%pre
+if [ -n "`getgid tinydns`" ]; then
+ if [ "`getgid tinydns`" != "59" ]; then
+ echo "Warning: group tinydns haven't gid=59. Correct this before installing djbdns" 1>&2
+ exit 1
+ fi
+else
+ %{_sbindir}/groupadd -g 59 -r -f tinydns
+fi
+if [ -n "`id -u tinydns 2>/dev/null`" ]; then
+ if [ "`id -u tinydns`" != "59" ]; then
+ echo "Warning: user tinydns haven't uid=59. Correct this before installing djbdns" 1>&2
+ exit 1
+ fi
+else
+ %{_sbindir}/useradd -u 59 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g tinydns tinydns 1>&2
+fi
+if [ -n "`id -u dnslog 2>/dev/null`" ]; then
+ if [ "`id -u dnslog`" != "60" ]; then
+ echo "Warning: user dnslog haven't uid=60. Correct this before installing djbdns" 1>&2
+ exit 1
+ fi
+else
+ %{_sbindir}/useradd -u 60 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g tinydns dnslog 1>&2
+fi
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.gz ../doc/
+%doc *.gz doc/*
%attr(755,root,root) %{_bindir}/*
%attr(644,root,root) %{_sysconfdir}/*