]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.spec
- rel 2 (rebuild with fixed %useradd/%groupadd macros)
[packages/pdnsd.git] / pdnsd.spec
1 %define par     par
2 Summary:        A caching dns proxy for small networks or dialin accounts
3 Summary(pl):    DNS proxy serwer dla ma³ej sieci lub jednostki z po³±czeniem dialup
4 Name:           pdnsd
5 Version:        1.2.5
6 Release:        2
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:  8b1bb9b6b40383a484a90de5d992b4ee
11 Source1:        %{name}.init
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
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
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 -p0
52 %patch1 -p1
53
54 %build
55 rm -fr src/rc
56 %{__aclocal}
57 %{__autoconf}
58 %{__autoheader}
59 %{__automake}
60 %configure \
61         --with-default-id=pdnsd \
62         --enable-ipv6 \
63         --with-thread-lib=LinuxThreads2 \
64         --enable-tcp-subseq
65 %{__make}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
75 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
76
77 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %pre
83 %groupadd -g 140 pdnsd
84 %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd
85
86 %post
87 /sbin/chkconfig --add pdnsd
88 %service pdnsd restart
89
90 %preun
91 if [ "$1" = "0" ]; then
92         %service pdnsd stop
93         /sbin/chkconfig --del pdnsd
94 fi
95
96 %postun
97 if [ "$1" = "0" ]; then
98         %userremove pdnsd
99         %groupremove pdnsd
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
105 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd
107 %attr(755,root,root) %{_sbindir}/pdnsd
108 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
109 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
110 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache
111 %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf
112 %{_mandir}/man[58]/*
This page took 0.0318 seconds and 3 git commands to generate.