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