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