]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.spec
- cleanup
[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:        1
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 Obsoletes:      bind
33 Obsoletes:      maradns
34 Obsoletes:      maradns-zoneserver
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 pdnsd is a proxy DNS daemon with permanent (disk-)cache and the
39 ability to serve local records. It is designed to detect network
40 outages or hangups and to prevent DNS-dependent applications like
41 Netscape Navigator from hanging.
42
43 %description -l pl.UTF-8
44 pdnsd jest serwerem proxy dla usługi DNS, zapisującym bufor ze
45 zgromadzonymi informacjami na dysku. Będzie on szczególnie użyteczny
46 dla jednostki pracujacej w trybie off-line (np. poprzez połączenie
47 dialup).
48
49 %prep
50 %setup -q
51 %patch0 -p1
52 %patch1 -p1
53 %patch2 -p1
54
55 %build
56 rm -fr src/rc
57 %{__aclocal}
58 %{__autoconf}
59 %{__autoheader}
60 %{__automake}
61 %configure \
62         --with-default-id=pdnsd \
63         --enable-ipv6 \
64         --enable-tcp-subseq \
65         --with-query-method=udptcp \
66         --with-thread-lib=LinuxThreads2 \
67         --with-random-device=/dev/urandom \
68         --with-par-queries=16
69
70 %{__make}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
75
76 %{__make} install \
77         DESTDIR=$RPM_BUILD_ROOT
78
79 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
80 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
81
82 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %pre
88 %groupadd -g 140 pdnsd
89 %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd
90
91 %post
92 /sbin/chkconfig --add pdnsd
93 %service pdnsd restart
94
95 %preun
96 if [ "$1" = "0" ]; then
97         %service pdnsd stop
98         /sbin/chkconfig --del pdnsd
99 fi
100
101 %postun
102 if [ "$1" = "0" ]; then
103         %userremove pdnsd
104         %groupremove pdnsd
105 fi
106
107 %files
108 %defattr(644,root,root,755)
109 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
110 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd
112 %attr(755,root,root) %{_sbindir}/pdnsd
113 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
114 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
115 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache
116 %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf
117 %{_mandir}/man[58]/*
This page took 0.07981 seconds and 3 git commands to generate.