]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.spec
- rel 3; don't obsolete real nameservers that do other things than only caching
[packages/pdnsd.git] / pdnsd.spec
1 %define par     par
2 Summary:        A caching dns proxy for small networks or dialin accounts
3 Summary(pl.UTF-8):      DNS proxy serwer dla małej sieci lub jednostki z połączeniem dialup
4 Name:           pdnsd
5 Version:        1.2.7
6 Release:        3
7 License:        GPL
8 Group:          Networking/Daemons
9 Source0:        http://www.phys.uu.nl/~rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
10 # Source0-md5:  114b3b21b09b43cbfcccdde726b84c12
11 Source1:        %{name}.init
12 Source2:        %{name}.sysconfig
13 Patch0:         %{name}-ac_am.patch
14 Patch1:         %{name}-query_roots_in_default_conf.patch
15 Patch2:         %{name}-ipv6_pktinfo.patch
16 URL:            http://www.phys.uu.nl/~rombouts/pdnsd.html
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  flex
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires(post,preun):   /sbin/chkconfig
22 Requires(postun):       /usr/sbin/groupdel
23 Requires(postun):       /usr/sbin/userdel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/bin/getgid
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /usr/sbin/useradd
28 Requires:       rc-scripts
29 Provides:       caching-nameserver
30 Provides:       group(pdnsd)
31 Provides:       user(pdnsd)
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 pdnsd is a proxy DNS daemon with permanent (disk-)cache and the
36 ability to serve local records. It is designed to detect network
37 outages or hangups and to prevent DNS-dependent applications like
38 Netscape Navigator from hanging.
39
40 %description -l pl.UTF-8
41 pdnsd jest serwerem proxy dla usługi DNS, zapisującym bufor ze
42 zgromadzonymi informacjami na dysku. Będzie on szczególnie użyteczny
43 dla jednostki pracujacej w trybie off-line (np. poprzez połączenie
44 dialup).
45
46 %prep
47 %setup -q
48 %patch0 -p1
49 %patch1 -p1
50 %patch2 -p1
51
52 %build
53 rm -fr src/rc
54 %{__aclocal}
55 %{__autoconf}
56 %{__autoheader}
57 %{__automake}
58 %configure \
59         --with-default-id=pdnsd \
60         --enable-ipv6 \
61         --enable-tcp-subseq \
62         --with-query-method=udptcp \
63         --with-thread-lib=LinuxThreads2 \
64         --with-random-device=/dev/urandom \
65         --with-par-queries=16
66
67 %{__make}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
72
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
77 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
78
79 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %pre
85 %groupadd -g 140 pdnsd
86 %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd
87
88 %post
89 /sbin/chkconfig --add pdnsd
90 %service pdnsd restart
91
92 %preun
93 if [ "$1" = "0" ]; then
94         %service pdnsd stop
95         /sbin/chkconfig --del pdnsd
96 fi
97
98 %postun
99 if [ "$1" = "0" ]; then
100         %userremove pdnsd
101         %groupremove pdnsd
102 fi
103
104 %files
105 %defattr(644,root,root,755)
106 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
107 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd
109 %attr(755,root,root) %{_sbindir}/pdnsd
110 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
111 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
112 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache
113 %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf
114 %{_mandir}/man[58]/*
This page took 0.094395 seconds and 3 git commands to generate.