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