]> git.pld-linux.org Git - packages/pdnsd.git/blame - pdnsd.spec
Release 2. Restart=on-abort in service file.
[packages/pdnsd.git] / pdnsd.spec
CommitLineData
4365ea3f 1# TODO: Readd deletion src/rc and auto* stuff
dbe438e2 2%define par par
4aa9b7eb 3Summary: A caching dns proxy for small networks or dialin accounts
b00e89ab 4Summary(pl.UTF-8): DNS proxy serwer dla małej sieci lub jednostki z połączeniem dialup
4aa9b7eb 5Name: pdnsd
4365ea3f 6Version: 1.2.9a
ad9533c6 7Release: 2
4aa9b7eb 8License: GPL
72626015 9Group: Networking/Daemons
4365ea3f 10Source0: http://members.home.nl/p.a.rombouts/pdnsd/releases/%{name}-%{version}-%{par}.tar.gz
50686394 11# Source0-md5: 2f3e705d59a0f9308ad9504b24400769
8e605824 12Source1: %{name}.init
825baa1c 13Source2: %{name}.sysconfig
ad9533c6 14Source3: %{name}.service
fad92192 15Patch0: %{name}-ac_am.patch
16Patch1: %{name}-query_roots_in_default_conf.patch
17Patch2: %{name}-ipv6_pktinfo.patch
4365ea3f 18URL: http://members.home.nl/p.a.rombouts/pdnsd/
959d93b2
JB
19BuildRequires: autoconf
20BuildRequires: automake
85351338 21BuildRequires: flex
dbe438e2
ER
22BuildRequires: rpmbuild(macros) >= 1.268
23Requires(post,preun): /sbin/chkconfig
24Requires(postun): /usr/sbin/groupdel
25Requires(postun): /usr/sbin/userdel
e44d0fe7
ER
26Requires(pre): /bin/id
27Requires(pre): /usr/bin/getgid
28Requires(pre): /usr/sbin/groupadd
29Requires(pre): /usr/sbin/useradd
dbe438e2 30Requires: rc-scripts
fe855ea1 31Provides: caching-nameserver
e44d0fe7 32Provides: group(pdnsd)
dbe438e2 33Provides: user(pdnsd)
061f8294 34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
4aa9b7eb 35
b294b2e1 36%description
4aa9b7eb 37pdnsd is a proxy DNS daemon with permanent (disk-)cache and the
38ability to serve local records. It is designed to detect network
39outages or hangups and to prevent DNS-dependent applications like
40Netscape Navigator from hanging.
41
901c24fb
JR
42%description -l pl.UTF-8
43pdnsd jest serwerem proxy dla usługi DNS, zapisującym bufor ze
44zgromadzonymi informacjami na dysku. Będzie on szczególnie użyteczny
45dla jednostki pracujacej w trybie off-line (np. poprzez połączenie
e405e30a 46dialup).
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 72rm -rf $RPM_BUILD_ROOT
825baa1c 73install -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 78install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pdnsd
825baa1c 79install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pdnsd
ad9533c6
MK
80install -d $RPM_BUILD_ROOT/%{systemdunitdir}
81install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
913c14f8 82mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pdnsd.conf{.sample,}
8e605824 83
4aa9b7eb 84%clean
24df0c3f 85rm -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 97if [ "$1" = "0" ]; then
dbe438e2 98 %service pdnsd stop
fafa8732 99 /sbin/chkconfig --del pdnsd
100fi
ad9533c6 101%systemd_preun %{name}.service
b294b2e1 102
94431927
AM
103%postun
104if [ "$1" = "0" ]; then
e44d0fe7
ER
105 %userremove pdnsd
106 %groupremove pdnsd
94431927
AM
107fi
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]/*
This page took 1.761637 seconds and 5 git commands to generate.