]> git.pld-linux.org Git - packages/unbound.git/blame - unbound.spec
- up to 1.6.7
[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
23f4b7e9 10Version: 1.6.7
05a660e9 11Release: 1
ca75cd40 12License: BSD
89d05c6c 13Group: Applications/Network
ca75cd40 14Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
23f4b7e9 15# Source0-md5: 67ed382add11134d689f5e88f8efc43e
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
23f4b7e9 21# Source4-md5: b803eb7fb9dea562877f2dd0cb1903ca
b53232e5 22Patch0: %{name}-default_trust_anchor.patch
f33b27d4 23Patch1: %{name}-sh.patch
05a660e9 24Patch2: %{name}-pythondir.patch
2b3ec506 25Patch3: %{name}-flex.patch
ca75cd40 26URL: http://unbound.net/
f33b27d4
JB
27BuildRequires: autoconf >= 2.56
28BuildRequires: automake
2b3ec506 29BuildRequires: bison
89d05c6c 30BuildRequires: expat-devel
2b3ec506 31BuildRequires: flex
60c650ce 32%{?with_dnstap:BuildRequires: fstrm-devel}
5ec53429 33BuildRequires: libevent-devel
f33b27d4
JB
34BuildRequires: libtool
35BuildRequires: openssl-devel >= 1.0
60c650ce 36%{?with_dnstap:BuildRequires: protobuf-c-devel}
2b3ec506
JB
37BuildRequires: rpmbuild(macros) >= 1.671
38%{?with_systemd:BuildRequires: systemd-devel}
89d05c6c
JB
39%if %{with python}
40BuildRequires: python-devel >= 1:2.4.0
41BuildRequires: swig-python
42%endif
5946fd51 43Provides: user(unbound)
2b3ec506 44Requires(post,preun): /sbin/chkconfig
5946fd51
AM
45Requires(postun): /usr/sbin/userdel
46Requires(pre): /bin/id
47Requires(pre): /usr/sbin/useradd
0ddfe461 48Requires: systemd-units >= 38
89d05c6c 49Requires: %{name}-libs = %{version}-%{release}
ca75cd40 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
89d05c6c 56Labs. It is based on ideas and algorithms taken from a Java prototype
ca75cd40 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
89d05c6c
JB
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
ca75cd40 89%package devel
90Summary: Header files for unbound library
91Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
92Group: Development/Libraries
89d05c6c 93Requires: %{name}-libs = %{version}-%{release}
89d05c6c 94Requires: openssl-devel
ca75cd40 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
89d05c6c
JB
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
ca75cd40 126%prep
127%setup -q
b53232e5 128%patch0 -p1
f33b27d4 129%patch1 -p1
05a660e9 130%patch2 -p1
2b3ec506 131%patch3 -p1
ca75cd40 132
133%build
f33b27d4
JB
134%{__libtoolize}
135%{__aclocal}
136%{__autoconf}
137%{__autoheader}
89d05c6c 138%configure \
60c650ce 139 %{?with_dnstap:--enable-dnstap} \
2b3ec506 140 %{?with_systemd:--enable-systemd} \
e5f6e160
JK
141 %{__with_without python pyunbound} \
142 %{__with_without python pythonmodule} \
0ddfe461 143 --with-pidfile=/run/%{name}.pid \
267353b4 144 --with-chroot-dir="" \
0ddfe461
JK
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
ca75cd40 149%{__make}
150
151%install
152rm -rf $RPM_BUILD_ROOT
0ddfe461 153install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
ca75cd40 154
155%{__make} install \
156 DESTDIR=$RPM_BUILD_ROOT
157
0ddfe461
JK
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
89d05c6c 165%if %{with python}
42c66384 166%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la
89d05c6c
JB
167%py_comp $RPM_BUILD_ROOT%{py_sitedir}
168%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
169%py_postclean
170%endif
171
ca75cd40 172%clean
173rm -rf $RPM_BUILD_ROOT
174
ca75cd40 175%post
176/sbin/chkconfig --add %{name}
0ddfe461 177%systemd_post %{name}.service
ca75cd40 178%service %{name} restart
179
5c77fe31
AM
180%pre
181%useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
182
ca75cd40 183%preun
184if [ "$1" = "0" ]; then
185 %service -q %{name} stop
186 /sbin/chkconfig --del %{name}
187fi
0ddfe461 188%systemd_preun %{name}.service
ca75cd40 189
5c77fe31
AM
190%postun
191if [ "$1" = "0" ]; then
192 %userremove unbound
193fi
0ddfe461
JK
194%systemd_reload
195
196%triggerpostun -- %{name} < 1.4.22-1
197%systemd_trigger %{name}.service
5c77fe31 198
89d05c6c
JB
199%post libs -p /sbin/ldconfig
200%postun libs -p /sbin/ldconfig
201
ca75cd40 202%files
203%defattr(644,root,root,755)
89d05c6c 204%doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
cda91157 205%attr(754,root,root) /etc/rc.d/init.d/unbound
0ddfe461 206%{systemdunitdir}/%{name}.service
783ab43a 207%dir %{_sysconfdir}/%{name}
208%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
0ddfe461
JK
209%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
210%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
ca75cd40 211%attr(755,root,root) %{_sbindir}/unbound
511c7cae 212%attr(755,root,root) %{_sbindir}/unbound-anchor
ca75cd40 213%attr(755,root,root) %{_sbindir}/unbound-checkconf
5ec53429 214%attr(755,root,root) %{_sbindir}/unbound-control*
ca75cd40 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*
511c7cae 220%{_mandir}/man8/unbound-anchor.8*
379d3e5e 221%{_mandir}/man8/unbound-control*.8*
0ddfe461
JK
222%dir %attr(755,unbound,nobody) /var/lib/%{name}
223%ghost /var/lib/%{name}/root.key
ca75cd40 224
89d05c6c
JB
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
ca75cd40 230%files devel
cda91157 231%defattr(644,root,root,755)
89d05c6c 232%attr(755,root,root) %{_libdir}/libunbound.so
ca75cd40 233%{_libdir}/libunbound.la
89d05c6c 234%{_includedir}/unbound.h
ca75cd40 235%{_mandir}/man3/libunbound.3*
44b158d7 236%{_mandir}/man3/ub_*.3*
ca75cd40 237
238%files static
cda91157 239%defattr(644,root,root,755)
ca75cd40 240%{_libdir}/libunbound.a
89d05c6c
JB
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]
d1474b1b 247%{py_sitedir}/unboundmodule.py[co]
89d05c6c 248%endif
This page took 0.163452 seconds and 4 git commands to generate.