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