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