]> git.pld-linux.org Git - packages/unbound.git/blob - unbound.spec
dbf53001d59e1a5eaa183bf7e852a541be363b11
[packages/unbound.git] / unbound.spec
1 #
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
7 Name:           unbound
8 Version:        1.4.22
9 Release:        1
10 License:        BSD
11 Group:          Applications/Network
12 Source0:        http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
13 # Source0-md5:  59728c74fef8783f8bad1d7451eba97f
14 Source1:        %{name}.init
15 URL:            http://unbound.net/
16 BuildRequires:  expat-devel
17 BuildRequires:  libevent-devel
18 BuildRequires:  openssl-devel
19 BuildRequires:  rpmbuild(macros) >= 1.228
20 %if %{with python}
21 BuildRequires:  python-devel >= 1:2.4.0
22 BuildRequires:  swig-python
23 %endif
24 Requires(post,preun):   /sbin/chkconfig
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
30 Requires:       %{name}-libs = %{version}-%{release}
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
37 Labs. It is based on ideas and algorithms taken from a Java prototype
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
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
70 %package devel
71 Summary:        Header files for unbound library
72 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki unbound
73 Group:          Development/Libraries
74 Requires:       %{name}-libs = %{version}-%{release}
75 Requires:       openssl-devel
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
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
107 %prep
108 %setup -q
109
110 %build
111 %configure \
112         %{?with_python:--with-pyunbound}
113 %{__make}
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
118 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
119
120 %{__make} install \
121         DESTDIR=$RPM_BUILD_ROOT
122
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
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post
134 /sbin/chkconfig --add %{name}
135 %service %{name} restart
136
137 %pre
138 %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
139
140 %preun
141 if [ "$1" = "0" ]; then
142         %service -q %{name} stop
143         /sbin/chkconfig --del %{name}
144 fi
145
146 %postun
147 if [ "$1" = "0" ]; then
148         %userremove unbound
149 fi
150
151 %post   libs -p /sbin/ldconfig
152 %postun libs -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
157 %attr(754,root,root) /etc/rc.d/init.d/unbound
158 %dir %{_sysconfdir}/%{name}
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
160 %attr(755,root,root) %{_sbindir}/unbound
161 %attr(755,root,root) %{_sbindir}/unbound-anchor
162 %attr(755,root,root) %{_sbindir}/unbound-checkconf
163 %attr(755,root,root) %{_sbindir}/unbound-control*
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*
169 %{_mandir}/man8/unbound-anchor.8*
170 %{_mandir}/man8/unbound-control*.8*
171
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
177 %files devel
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_libdir}/libunbound.so
180 %{_libdir}/libunbound.la
181 %{_includedir}/unbound.h
182 %{_mandir}/man3/libunbound.3*
183 %{_mandir}/man3/ub_*.3*
184
185 %files static
186 %defattr(644,root,root,755)
187 %{_libdir}/libunbound.a
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
This page took 0.033038 seconds and 3 git commands to generate.