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