1 Summary: A caching dns proxy for small networks or dialin accounts
2 Summary(pl): DNS proxy serwer dla ma³ej sieci lub jednostki z po³±czeniem dialup
8 Group: Networking/Daemons
9 Source0: http://www.phys.uu.nl/~rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
10 # Source0-md5: 7be77e25ba8b3de73df32706d956c294
12 Source2: %{name}.sysconfig
13 Patch0: %{name}-threads_signals.patch
14 Patch1: %{name}-ac_am.patch
15 # Old URL: http://home.t-online.de/home/Moestl/
16 URL: http://www.phys.uu.nl/~rombouts/pdnsd.html
17 BuildRequires: autoconf
18 BuildRequires: automake
21 Requires(post,preun): /sbin/chkconfig
22 Provides: caching-nameserver
25 Obsoletes: maradns-zoneserver
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 pdnsd is a proxy DNS daemon with permanent (disk-)cache and the
30 ability to serve local records. It is designed to detect network
31 outages or hangups and to prevent DNS-dependent applications like
32 Netscape Navigator from hanging.
35 pdnsd jest serwerem proxy dla us³ugi DNS, zapisuj±cym bufor ze
36 zgromadzonymi informacjami na dysku. Bêdzie on szczególnie u¿yteczny
37 dla jednostki pracujacej w trybie off-line (np. poprzez po³±czenie
52 --with-default-id=pdnsd \
54 --with-thread-lib=LinuxThreads2 \
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
63 DESTDIR=$RPM_BUILD_ROOT
65 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
66 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
68 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
71 rm -rf $RPM_BUILD_ROOT
74 if [ -n "`/usr/bin/getgid pdnsd`" ]; then
75 if [ "`/usr/bin/getgid pdnsd`" != "140" ]; then
76 echo "Error: group pdnsd doesn't have gid=140. Correct this before installing pdnsdd." 1>&2
80 /usr/sbin/groupadd -g 140 pdnsd 1>&2
82 if [ -n "`/bin/id -u pdnsd 2>/dev/null`" ]; then
83 if [ "`/bin/id -u pdnsd`" != "140" ]; then
84 echo "Error: user pdnsd doesn't have uid=140. Correct this before installing pdnsdd server." 1>&2
88 /usr/sbin/useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" \
93 /sbin/chkconfig --add pdnsd
94 if [ -f %{_localstatedir}/lock/subsys/pdnsd ]; then
95 /etc/rc.d/init.d/pdnsd restart >&2
97 echo "Run \"/etc/rc.d/init.d/pdnsd start\" to start pdnsd." >&2
101 if [ "$1" = "0" ]; then
102 if [ -f %{_localstatedir}/lock/subsys/pdnsd ]; then
103 /etc/rc.d/init.d/pdnsd stop
105 /sbin/chkconfig --del pdnsd
109 if [ "$1" = "0" ]; then
115 %defattr(644,root,root,755)
116 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
117 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
118 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/pdnsd
119 %attr(755,root,root) %{_sbindir}/pdnsd
120 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
121 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
122 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 size mtime) %{_var}/cache/pdnsd/pdnsd.cache
123 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pdnsd.conf