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