]> git.pld-linux.org Git - packages/unbound.git/blame - unbound.spec
- added dnstap bcond
[packages/unbound.git] / unbound.spec
CommitLineData
ca75cd40 1#
89d05c6c
JB
2# Conditional build:
3%bcond_without python # Python binding
60c650ce 4%bcond_with dnstap # dnstap replication support
89d05c6c
JB
5#
6Summary: Recursive, validating DNS resolver
7Summary(pl.UTF-8): Rekurencyjny, weryfikujący resolver DNS
ca75cd40 8Name: unbound
f33b27d4 9Version: 1.5.6
6cbb45bd 10Release: 1
ca75cd40 11License: BSD
89d05c6c 12Group: Applications/Network
ca75cd40 13Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
f33b27d4 14# Source0-md5: 691a34abd8e9257dd65b70f28326c1f0
cda91157 15Source1: %{name}.init
0ddfe461
JK
16Source2: %{name}.service
17Source3: https://data.iana.org/root-anchors/icannbundle.pem
d1474b1b 18# Source3-md5: 1ad315c80d044eca2da29785eee6f7c3
0ddfe461 19Source4: ftp://ftp.internic.net/domain/named.cache
d1474b1b 20# Source4-md5: b2afc34d106e104730b63876c9a07caf
b53232e5 21Patch0: %{name}-default_trust_anchor.patch
f33b27d4 22Patch1: %{name}-sh.patch
ca75cd40 23URL: http://unbound.net/
f33b27d4
JB
24BuildRequires: autoconf >= 2.56
25BuildRequires: automake
89d05c6c 26BuildRequires: expat-devel
60c650ce 27%{?with_dnstap:BuildRequires: fstrm-devel}
5ec53429 28BuildRequires: libevent-devel
f33b27d4
JB
29BuildRequires: libtool
30BuildRequires: openssl-devel >= 1.0
60c650ce 31%{?with_dnstap:BuildRequires: protobuf-c-devel}
ca75cd40 32BuildRequires: rpmbuild(macros) >= 1.228
89d05c6c
JB
33%if %{with python}
34BuildRequires: python-devel >= 1:2.4.0
35BuildRequires: swig-python
36%endif
ca75cd40 37Requires(post,preun): /sbin/chkconfig
0ddfe461 38BuildRequires: rpmbuild(macros) >= 1.671
5946fd51
AM
39Provides: user(unbound)
40Requires(postun): /usr/sbin/userdel
41Requires(pre): /bin/id
42Requires(pre): /usr/sbin/useradd
0ddfe461 43Requires: systemd-units >= 38
89d05c6c 44Requires: %{name}-libs = %{version}-%{release}
ca75cd40 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Unbound is a validating, recursive, and caching DNS resolver.
49
50The C implementation of Unbound is developed and maintained by NLnet
89d05c6c 51Labs. It is based on ideas and algorithms taken from a Java prototype
ca75cd40 52developed by Verisign labs, Nominet, Kirei and ep.net.
53
54Unbound is designed as a set of modular components, so that also
55DNSSEC (secure DNS) validation and stub-resolvers (that do not run as
56a server, but are linked into an application) are easily possible.
57
89d05c6c
JB
58%description -l pl.UTF-8
59Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod
60rozwiązujący nazwy) DNS.
61
62Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet
63Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z
64prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz
65ep.net.
66
67Unbound został zaprojektowany jako zbiór modularnych komponentów, więc
68możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz
69resolvery-zaślepki (nie działające jako serwer, ale wbudowane w
70aplikację).
71
72%package libs
73Summary: Unbound shared library
74Summary(pl.UTF-8): Biblioteka współdzielona Unbound
75Group: Libraries
76Conflicts: unbound < 1.4.18-1
77
78%description libs
79Unbound shared library.
80
81%description libs -l pl.UTF-8
82Biblioteka współdzielona Unbound.
83
ca75cd40 84%package devel
85Summary: Header files for unbound library
86Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
87Group: Development/Libraries
89d05c6c 88Requires: %{name}-libs = %{version}-%{release}
89d05c6c 89Requires: openssl-devel
ca75cd40 90
91%description devel
92Header files for unbound library.
93
94%description devel -l pl.UTF-8
95Pliki nagłówkowe biblioteki unbound.
96
97%package static
98Summary: Static unbound library
99Summary(pl.UTF-8): Statyczna biblioteka unbound
100Group: Development/Libraries
101Requires: %{name}-devel = %{version}-%{release}
102
103%description static
104Static unbound library.
105
106%description static -l pl.UTF-8
107Statyczna biblioteka unbound.
108
89d05c6c
JB
109%package -n python-unbound
110Summary: Python interface to unbound library
111Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound
112Group: Python/Libraries
113Requires: %{name}-libs = %{version}-%{release}
114
115%description -n python-unbound
116Python interface to unbound library.
117
118%description -n python-unbound -l pl.UTF-8
119Pythonowy interfejs do biblioteki unbound.
120
ca75cd40 121%prep
122%setup -q
b53232e5 123%patch0 -p1
f33b27d4 124%patch1 -p1
ca75cd40 125
126%build
f33b27d4
JB
127%{__libtoolize}
128%{__aclocal}
129%{__autoconf}
130%{__autoheader}
89d05c6c 131%configure \
60c650ce 132 %{?with_dnstap:--enable-dnstap} \
e5f6e160
JK
133 %{__with_without python pyunbound} \
134 %{__with_without python pythonmodule} \
0ddfe461 135 --with-pidfile=/run/%{name}.pid \
267353b4 136 --with-chroot-dir="" \
0ddfe461
JK
137 --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \
138 --with-rootkey-file=/var/lib/%{name}/root.key \
139 --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem
140
ca75cd40 141%{__make}
142
143%install
144rm -rf $RPM_BUILD_ROOT
0ddfe461 145install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
ca75cd40 146
147%{__make} install \
148 DESTDIR=$RPM_BUILD_ROOT
149
0ddfe461
JK
150install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
151install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
152install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem
153install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache
154
155touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key
156
89d05c6c 157%if %{with python}
42c66384 158%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la
89d05c6c
JB
159%py_comp $RPM_BUILD_ROOT%{py_sitedir}
160%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
161%py_postclean
162%endif
163
ca75cd40 164%clean
165rm -rf $RPM_BUILD_ROOT
166
ca75cd40 167%post
168/sbin/chkconfig --add %{name}
0ddfe461 169%systemd_post %{name}.service
ca75cd40 170%service %{name} restart
171
5c77fe31
AM
172%pre
173%useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
174
ca75cd40 175%preun
176if [ "$1" = "0" ]; then
177 %service -q %{name} stop
178 /sbin/chkconfig --del %{name}
179fi
0ddfe461 180%systemd_preun %{name}.service
ca75cd40 181
5c77fe31
AM
182%postun
183if [ "$1" = "0" ]; then
184 %userremove unbound
185fi
0ddfe461
JK
186%systemd_reload
187
188%triggerpostun -- %{name} < 1.4.22-1
189%systemd_trigger %{name}.service
5c77fe31 190
89d05c6c
JB
191%post libs -p /sbin/ldconfig
192%postun libs -p /sbin/ldconfig
193
ca75cd40 194%files
195%defattr(644,root,root,755)
89d05c6c 196%doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
cda91157 197%attr(754,root,root) /etc/rc.d/init.d/unbound
0ddfe461 198%{systemdunitdir}/%{name}.service
783ab43a 199%dir %{_sysconfdir}/%{name}
200%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
0ddfe461
JK
201%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
202%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
ca75cd40 203%attr(755,root,root) %{_sbindir}/unbound
511c7cae 204%attr(755,root,root) %{_sbindir}/unbound-anchor
ca75cd40 205%attr(755,root,root) %{_sbindir}/unbound-checkconf
5ec53429 206%attr(755,root,root) %{_sbindir}/unbound-control*
ca75cd40 207%attr(755,root,root) %{_sbindir}/unbound-host
208%{_mandir}/man1/unbound-host.1*
209%{_mandir}/man5/unbound.conf.5*
210%{_mandir}/man8/unbound-checkconf.8*
211%{_mandir}/man8/unbound.8*
511c7cae 212%{_mandir}/man8/unbound-anchor.8*
379d3e5e 213%{_mandir}/man8/unbound-control*.8*
0ddfe461
JK
214%dir %attr(755,unbound,nobody) /var/lib/%{name}
215%ghost /var/lib/%{name}/root.key
ca75cd40 216
89d05c6c
JB
217%files libs
218%defattr(644,root,root,755)
219%attr(755,root,root) %{_libdir}/libunbound.so.*.*.*
220%attr(755,root,root) %ghost %{_libdir}/libunbound.so.2
221
ca75cd40 222%files devel
cda91157 223%defattr(644,root,root,755)
89d05c6c 224%attr(755,root,root) %{_libdir}/libunbound.so
ca75cd40 225%{_libdir}/libunbound.la
89d05c6c 226%{_includedir}/unbound.h
ca75cd40 227%{_mandir}/man3/libunbound.3*
44b158d7 228%{_mandir}/man3/ub_*.3*
ca75cd40 229
230%files static
cda91157 231%defattr(644,root,root,755)
ca75cd40 232%{_libdir}/libunbound.a
89d05c6c
JB
233
234%if %{with python}
235%files -n python-unbound
236%defattr(644,root,root,755)
237%attr(755,root,root) %{py_sitedir}/_unbound.so*
238%{py_sitedir}/unbound.py[co]
d1474b1b 239%{py_sitedir}/unboundmodule.py[co]
89d05c6c 240%endif
This page took 0.12496 seconds and 4 git commands to generate.