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