]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.spec
- updated for 1.2.4
[packages/pdnsd.git] / pdnsd.spec
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
3 Name:           pdnsd
4 Version:        1.2.4
5 %define par     par
6 Release:        0.par0.0
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:  aafb9d65d713b4bc2c6c4ba822e0bd3c
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.202
21 PreReq:         rc-scripts
22 Requires(pre):  /bin/id
23 Requires(pre):  /usr/bin/getgid
24 Requires(pre):  /usr/sbin/groupadd
25 Requires(pre):  /usr/sbin/useradd
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 Requires(post,preun):   /sbin/chkconfig
29 Provides:       caching-nameserver
30 Provides:       user(pdnsd)
31 Provides:       group(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 if [ -f %{_localstatedir}/lock/subsys/pdnsd ]; then
89         /etc/rc.d/init.d/pdnsd restart >&2
90 else
91         echo "Run \"/etc/rc.d/init.d/pdnsd start\" to start pdnsd." >&2
92 fi
93
94 %preun
95 if [ "$1" = "0" ]; then
96         if [ -f %{_localstatedir}/lock/subsys/pdnsd ]; then
97                 /etc/rc.d/init.d/pdnsd stop
98         fi
99         /sbin/chkconfig --del pdnsd
100 fi
101
102 %postun
103 if [ "$1" = "0" ]; then
104         %userremove pdnsd
105         %groupremove pdnsd
106 fi
107
108 %files
109 %defattr(644,root,root,755)
110 %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html
111 %attr(754,root,root) /etc/rc.d/init.d/pdnsd
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd
113 %attr(755,root,root) %{_sbindir}/pdnsd
114 %attr(755,root,root) %{_sbindir}/pdnsd-ctl
115 %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd
116 %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache
117 %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf
118 %{_mandir}/man[58]/*
This page took 0.07182 seconds and 3 git commands to generate.