3 %bcond_without python # Python binding
5 Summary: Recursive, validating DNS resolver
6 Summary(pl.UTF-8): Rekurencyjny, weryfikujący resolver DNS
11 Group: Applications/Network
12 Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
13 # Source0-md5: 59728c74fef8783f8bad1d7451eba97f
15 Source2: %{name}.service
16 Source3: https://data.iana.org/root-anchors/icannbundle.pem
17 # Source3-md5: 59774aba58dbde1049bdf4722fb4f02c
18 Source4: ftp://ftp.internic.net/domain/named.cache
19 # Source4-md5: b3b07a2944d29d1f5bd58fe2fe183148
20 URL: http://unbound.net/
21 BuildRequires: expat-devel
22 BuildRequires: libevent-devel
23 BuildRequires: openssl-devel
24 BuildRequires: rpmbuild(macros) >= 1.228
26 BuildRequires: python-devel >= 1:2.4.0
27 BuildRequires: swig-python
29 Requires(post,preun): /sbin/chkconfig
30 BuildRequires: rpmbuild(macros) >= 1.671
31 Provides: user(unbound)
32 Requires(postun): /usr/sbin/userdel
33 Requires(pre): /bin/id
34 Requires(pre): /usr/sbin/useradd
35 Requires: systemd-units >= 38
36 Requires: %{name}-libs = %{version}-%{release}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Unbound is a validating, recursive, and caching DNS resolver.
42 The C implementation of Unbound is developed and maintained by NLnet
43 Labs. It is based on ideas and algorithms taken from a Java prototype
44 developed by Verisign labs, Nominet, Kirei and ep.net.
46 Unbound is designed as a set of modular components, so that also
47 DNSSEC (secure DNS) validation and stub-resolvers (that do not run as
48 a server, but are linked into an application) are easily possible.
50 %description -l pl.UTF-8
51 Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod
52 rozwiązujący nazwy) DNS.
54 Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet
55 Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z
56 prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz
59 Unbound został zaprojektowany jako zbiór modularnych komponentów, więc
60 możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz
61 resolvery-zaślepki (nie działające jako serwer, ale wbudowane w
65 Summary: Unbound shared library
66 Summary(pl.UTF-8): Biblioteka współdzielona Unbound
68 Conflicts: unbound < 1.4.18-1
71 Unbound shared library.
73 %description libs -l pl.UTF-8
74 Biblioteka współdzielona Unbound.
77 Summary: Header files for unbound library
78 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
79 Group: Development/Libraries
80 Requires: %{name}-libs = %{version}-%{release}
81 Requires: openssl-devel
84 Header files for unbound library.
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki unbound.
90 Summary: Static unbound library
91 Summary(pl.UTF-8): Statyczna biblioteka unbound
92 Group: Development/Libraries
93 Requires: %{name}-devel = %{version}-%{release}
96 Static unbound library.
98 %description static -l pl.UTF-8
99 Statyczna biblioteka unbound.
101 %package -n python-unbound
102 Summary: Python interface to unbound library
103 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound
104 Group: Python/Libraries
105 Requires: %{name}-libs = %{version}-%{release}
107 %description -n python-unbound
108 Python interface to unbound library.
110 %description -n python-unbound -l pl.UTF-8
111 Pythonowy interfejs do biblioteki unbound.
118 %{?with_python:--with-pyunbound} \
119 --with-pidfile=/run/%{name}.pid \
120 --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \
121 --with-rootkey-file=/var/lib/%{name}/root.key \
122 --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
131 DESTDIR=$RPM_BUILD_ROOT
133 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
134 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
135 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem
136 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache
138 touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key
141 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.{la,a}
142 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
143 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
148 rm -rf $RPM_BUILD_ROOT
151 /sbin/chkconfig --add %{name}
152 %systemd_post %{name}.service
153 %service %{name} restart
156 %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
159 if [ "$1" = "0" ]; then
160 %service -q %{name} stop
161 /sbin/chkconfig --del %{name}
163 %systemd_preun %{name}.service
166 if [ "$1" = "0" ]; then
171 %triggerpostun -- %{name} < 1.4.22-1
172 %systemd_trigger %{name}.service
174 %post libs -p /sbin/ldconfig
175 %postun libs -p /sbin/ldconfig
178 %defattr(644,root,root,755)
179 %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
180 %attr(754,root,root) /etc/rc.d/init.d/unbound
181 %{systemdunitdir}/%{name}.service
182 %dir %{_sysconfdir}/%{name}
183 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
184 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
185 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
186 %attr(755,root,root) %{_sbindir}/unbound
187 %attr(755,root,root) %{_sbindir}/unbound-anchor
188 %attr(755,root,root) %{_sbindir}/unbound-checkconf
189 %attr(755,root,root) %{_sbindir}/unbound-control*
190 %attr(755,root,root) %{_sbindir}/unbound-host
191 %{_mandir}/man1/unbound-host.1*
192 %{_mandir}/man5/unbound.conf.5*
193 %{_mandir}/man8/unbound-checkconf.8*
194 %{_mandir}/man8/unbound.8*
195 %{_mandir}/man8/unbound-anchor.8*
196 %{_mandir}/man8/unbound-control*.8*
197 %dir %attr(755,unbound,nobody) /var/lib/%{name}
198 %ghost /var/lib/%{name}/root.key
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libunbound.so.*.*.*
203 %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libunbound.so
208 %{_libdir}/libunbound.la
209 %{_includedir}/unbound.h
210 %{_mandir}/man3/libunbound.3*
211 %{_mandir}/man3/ub_*.3*
214 %defattr(644,root,root,755)
215 %{_libdir}/libunbound.a
218 %files -n python-unbound
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{py_sitedir}/_unbound.so*
221 %{py_sitedir}/unbound.py[co]