]> git.pld-linux.org Git - packages/djbdns.git/blobdiff - djbdns.spec
- more macros...
[packages/djbdns.git] / djbdns.spec
index c6e96f26243f1d5ee7cd78486a5da52671475f06..cddf6eb7b45ba87cbc3af93f1b7aaf6c38738a0c 100644 (file)
@@ -2,7 +2,7 @@ Summary:        DJB DNS
 Summary(pl):   DJB DNS
 Name:          djbdns
 Version:       1.05
-Release:       2
+Release:       3
 License:       GPL
 Group:         Networking/Daemons
 Group(de):     Netzwerkwesen/Server
@@ -11,25 +11,29 @@ Source0:    http://cr.yp.to/djbdns/%{name}-%{version}.tar.gz
 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
@@ -68,13 +72,40 @@ install tinydns-get $RPM_BUILD_ROOT%{_bindir}
 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}/*
This page took 0.080699 seconds and 4 git commands to generate.