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