]>
Commit | Line | Data |
---|---|---|
dbe438e2 | 1 | %define par par |
4aa9b7eb | 2 | Summary: A caching dns proxy for small networks or dialin accounts |
b00e89ab | 3 | Summary(pl.UTF-8): DNS proxy serwer dla małej sieci lub jednostki z połączeniem dialup |
4aa9b7eb | 4 | Name: pdnsd |
39a34617 | 5 | Version: 1.2.6 |
6 | Release: 1 | |
4aa9b7eb | 7 | License: GPL |
72626015 | 8 | Group: Networking/Daemons |
94431927 | 9 | Source0: http://www.phys.uu.nl/~rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz |
39a34617 | 10 | # Source0-md5: 65c88e22152a885a0437578eedc8b118 |
8e605824 | 11 | Source1: %{name}.init |
825baa1c | 12 | Source2: %{name}.sysconfig |
913c14f8 | 13 | Patch0: %{name}-threads_signals.patch |
907cb677 | 14 | Patch1: %{name}-ac_am.patch |
a86e398a | 15 | Patch2: %{name}-query_roots_in_default_conf.patch |
39a34617 | 16 | Patch3: %{name}-ipv6_pktinfo.patch |
afe8359d AM |
17 | # Old URL: http://home.t-online.de/home/Moestl/ |
18 | URL: http://www.phys.uu.nl/~rombouts/pdnsd.html | |
959d93b2 JB |
19 | BuildRequires: autoconf |
20 | BuildRequires: automake | |
85351338 | 21 | BuildRequires: flex |
dbe438e2 ER |
22 | BuildRequires: rpmbuild(macros) >= 1.268 |
23 | Requires(post,preun): /sbin/chkconfig | |
24 | Requires(postun): /usr/sbin/groupdel | |
25 | Requires(postun): /usr/sbin/userdel | |
e44d0fe7 ER |
26 | Requires(pre): /bin/id |
27 | Requires(pre): /usr/bin/getgid | |
28 | Requires(pre): /usr/sbin/groupadd | |
29 | Requires(pre): /usr/sbin/useradd | |
dbe438e2 | 30 | Requires: rc-scripts |
fe855ea1 | 31 | Provides: caching-nameserver |
e44d0fe7 | 32 | Provides: group(pdnsd) |
dbe438e2 | 33 | Provides: user(pdnsd) |
fe855ea1 | 34 | Obsoletes: bind |
35 | Obsoletes: maradns | |
36 | Obsoletes: maradns-zoneserver | |
061f8294 | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4aa9b7eb | 38 | |
b294b2e1 | 39 | %description |
4aa9b7eb | 40 | pdnsd is a proxy DNS daemon with permanent (disk-)cache and the |
41 | ability to serve local records. It is designed to detect network | |
42 | outages or hangups and to prevent DNS-dependent applications like | |
43 | Netscape Navigator from hanging. | |
44 | ||
901c24fb JR |
45 | %description -l pl.UTF-8 |
46 | pdnsd jest serwerem proxy dla usługi DNS, zapisującym bufor ze | |
47 | zgromadzonymi informacjami na dysku. Będzie on szczególnie użyteczny | |
48 | dla jednostki pracujacej w trybie off-line (np. poprzez połączenie | |
e405e30a | 49 | dialup). |
8e605824 | 50 | |
b294b2e1 | 51 | %prep |
4aa9b7eb | 52 | %setup -q |
afe8359d | 53 | #%patch0 -p0 |
907cb677 | 54 | %patch1 -p1 |
a86e398a | 55 | %patch2 -p1 |
39a34617 | 56 | %patch3 -p1 |
4aa9b7eb | 57 | |
b294b2e1 | 58 | %build |
907cb677 | 59 | rm -fr src/rc |
6954b699 | 60 | %{__aclocal} |
2957b5a7 | 61 | %{__autoconf} |
6954b699 | 62 | %{__autoheader} |
2957b5a7 | 63 | %{__automake} |
4aa9b7eb | 64 | %configure \ |
94431927 | 65 | --with-default-id=pdnsd \ |
afe8359d | 66 | --enable-ipv6 \ |
39a34617 | 67 | --enable-tcp-subseq \ |
68 | --with-query-method=udptcp \ | |
94431927 | 69 | --with-thread-lib=LinuxThreads2 \ |
39a34617 | 70 | --with-random-device=/dev/urandom \ |
71 | --with-par-queries=16 | |
72 | ||
4aa9b7eb | 73 | %{__make} |
b294b2e1 | 74 | |
75 | %install | |
24df0c3f | 76 | rm -rf $RPM_BUILD_ROOT |
825baa1c | 77 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
4aa9b7eb | 78 | |
79997e1f JB |
79 | %{__make} install \ |
80 | DESTDIR=$RPM_BUILD_ROOT | |
2957b5a7 | 81 | |
24df0c3f | 82 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd |
825baa1c AM |
83 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd |
84 | ||
913c14f8 | 85 | mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,} |
8e605824 | 86 | |
4aa9b7eb | 87 | %clean |
24df0c3f | 88 | rm -rf $RPM_BUILD_ROOT |
de114e37 | 89 | |
94431927 | 90 | %pre |
e44d0fe7 ER |
91 | %groupadd -g 140 pdnsd |
92 | %useradd -u 140 -d /tmp -s /bin/false -c "pdnsd user" -g pdnsd pdnsd | |
94431927 | 93 | |
4aa9b7eb | 94 | %post |
fafa8732 | 95 | /sbin/chkconfig --add pdnsd |
dbe438e2 | 96 | %service pdnsd restart |
b294b2e1 | 97 | |
4aa9b7eb | 98 | %preun |
fafa8732 | 99 | if [ "$1" = "0" ]; then |
dbe438e2 | 100 | %service pdnsd stop |
fafa8732 | 101 | /sbin/chkconfig --del pdnsd |
102 | fi | |
b294b2e1 | 103 | |
94431927 AM |
104 | %postun |
105 | if [ "$1" = "0" ]; then | |
e44d0fe7 ER |
106 | %userremove pdnsd |
107 | %groupremove pdnsd | |
94431927 AM |
108 | fi |
109 | ||
b294b2e1 | 110 | %files |
4aa9b7eb | 111 | %defattr(644,root,root,755) |
04ce2cea | 112 | %doc AUTHORS ChangeLog NEWS README TODO doc/txt/*.txt doc/html/*.html |
86bf0013 | 113 | %attr(754,root,root) /etc/rc.d/init.d/pdnsd |
9a2662f7 | 114 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdnsd |
8e605824 | 115 | %attr(755,root,root) %{_sbindir}/pdnsd |
bfe767e3 | 116 | %attr(755,root,root) %{_sbindir}/pdnsd-ctl |
94431927 | 117 | %attr(775,pdnsd,pdnsd) %dir %{_var}/cache/pdnsd |
9a2662f7 | 118 | %attr(664,pdnsd,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_var}/cache/pdnsd/pdnsd.cache |
119 | %attr(640,root,pdnsd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdnsd.conf | |
94431927 | 120 | %{_mandir}/man[58]/* |