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