1 # TODO: Readd deletion src/rc and auto* stuff
3 Summary: A caching dns proxy for small networks or dialin accounts
4 Summary(pl.UTF-8): DNS proxy serwer dla małej sieci lub jednostki z połączeniem dialup
9 Group: Networking/Daemons
10 Source0: http://members.home.nl/p.a.rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
11 # Source0-md5: 2f3e705d59a0f9308ad9504b24400769
13 Source2: %{name}.sysconfig
14 Patch0: %{name}-ac_am.patch
15 Patch1: %{name}-query_roots_in_default_conf.patch
16 Patch2: %{name}-ipv6_pktinfo.patch
17 URL: http://members.home.nl/p.a.rombouts/pdnsd/
18 BuildRequires: autoconf
19 BuildRequires: automake
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires(post,preun): /sbin/chkconfig
23 Requires(postun): /usr/sbin/groupdel
24 Requires(postun): /usr/sbin/userdel
25 Requires(pre): /bin/id
26 Requires(pre): /usr/bin/getgid
27 Requires(pre): /usr/sbin/groupadd
28 Requires(pre): /usr/sbin/useradd
30 Provides: caching-nameserver
31 Provides: group(pdnsd)
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 pdnsd is a proxy DNS daemon with permanent (disk-)cache and the
37 ability to serve local records. It is designed to detect network
38 outages or hangups and to prevent DNS-dependent applications like
39 Netscape Navigator from hanging.
41 %description -l pl.UTF-8
42 pdnsd jest serwerem proxy dla usługi DNS, zapisującym bufor ze
43 zgromadzonymi informacjami na dysku. Będzie on szczególnie użyteczny
44 dla jednostki pracujacej w trybie off-line (np. poprzez połączenie
60 --with-default-id=pdnsd \
63 --with-query-method=udptcp \
64 --with-thread-lib=LinuxThreads2 \
65 --with-random-device=/dev/urandom \
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
75 DESTDIR=$RPM_BUILD_ROOT
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
78 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
80 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
83 rm -rf $RPM_BUILD_ROOT
86 %groupadd -g 140 pdnsd
87 %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd
90 /sbin/chkconfig --add pdnsd
91 %service pdnsd restart
94 if [ "$1" = "0" ]; then
96 /sbin/chkconfig --del pdnsd
100 if [ "$1" = "0" ]; then
106 %defattr(644,root,root,755)
107 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
108 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
109 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd
110 %attr(755,root,root) %{_sbindir}/pdnsd
111 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
112 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
113 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache
114 %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf