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