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