]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.spec
03e870048d71d46148a4c9cb5464d8f4f245177c
[packages/pdnsd.git] / pdnsd.spec
1 # TODO: Readd deletion  src/rc and auto* stuff
2 %define par     par
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
5 Name:           pdnsd
6 Version:        1.2.9a
7 Release:        1
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://members.home.nl/p.a.rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
11 # Source0-md5:  2f3e705d59a0f9308ad9504b24400769
12 Source1:        %{name}.init
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
20 BuildRequires:  flex
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
29 Requires:       rc-scripts
30 Provides:       caching-nameserver
31 Provides:       group(pdnsd)
32 Provides:       user(pdnsd)
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
40
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
45 dialup).
46
47 %prep
48 %setup -q
49 #%patch0 -p1
50 #%patch1 -p1
51 %patch2 -p1
52
53 %build
54 # rm -fr src/rc
55 # %{__aclocal}
56 # %{__autoconf}
57 # %{__autoheader}
58 # %{__automake}
59 %configure \
60         --with-default-id=pdnsd \
61         --enable-ipv6 \
62         --enable-tcp-subseq \
63         --with-query-method=udptcp \
64         --with-thread-lib=LinuxThreads2 \
65         --with-random-device=/dev/urandom \
66         --with-par-queries=16
67
68 %{__make}
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
73
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
78 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
79
80 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %pre
86 %groupadd -g 140 pdnsd
87 %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd
88
89 %post
90 /sbin/chkconfig --add pdnsd
91 %service pdnsd restart
92
93 %preun
94 if [ "$1" = "0" ]; then
95         %service pdnsd stop
96         /sbin/chkconfig --del pdnsd
97 fi
98
99 %postun
100 if [ "$1" = "0" ]; then
101         %userremove pdnsd
102         %groupremove pdnsd
103 fi
104
105 %files
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
115 %{_mandir}/man[58]/*
This page took 0.135718 seconds and 2 git commands to generate.