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