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