]>
Commit | Line | Data |
---|---|---|
2ec5cf8c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # don't build api docs | |
85272a9d | 4 | %bcond_without tests # don't perform "make check" |
62a8b2b3 | 5 | |
0414ac96 | 6 | Summary: Netlink sockets library |
cd2b2b50 | 7 | Summary(pl.UTF-8): Biblioteka do obsługi gniazd netlink |
822efbf9 | 8 | Name: libnl |
e49bc2c6 JB |
9 | Version: 3.2.25 |
10 | Release: 1 | |
95369c27 | 11 | Epoch: 1 |
822efbf9 | 12 | License: LGPL v2.1 |
13 | Group: Libraries | |
f4d917ec | 14 | Source0: http://www.infradead.org/~tgr/libnl/files/%{name}-%{version}.tar.gz |
e49bc2c6 | 15 | # Source0-md5: 03f74d0cd5037cadc8cdfa313bbd195c |
5d61105f | 16 | Source1: http://www.infradead.org/~tgr/libnl/files/%{name}-doc-%{version}.tar.gz |
e49bc2c6 | 17 | # Source1-md5: 641f73052d9f54e720efe1a476a20237 |
5aedace1 | 18 | Patch0: %{name}-link.patch |
b56ad239 | 19 | Patch1: %{name}-pedantic.patch |
973a8511 | 20 | URL: http://www.infradead.org/~tgr/libnl/ |
21c3bc75 | 21 | BuildRequires: autoconf >= 2.50 |
5aedace1 | 22 | BuildRequires: automake |
7f50b8be | 23 | BuildRequires: bison >= 2.4.0 |
85272a9d | 24 | %{?with_tests:BuildRequires: check >= 0.9.0} |
7f50b8be | 25 | BuildRequires: flex >= 2.5.34 |
5aedace1 | 26 | BuildRequires: libtool |
3bd3131a | 27 | BuildRequires: linux-libc-headers >= 6:2.6.23 |
85272a9d | 28 | BuildRequires: pkgconfig |
5aedace1 JB |
29 | BuildRequires: python-devel >= 1:2.6 |
30 | BuildRequires: rpmbuild(macros) >= 1.219 | |
31 | BuildRequires: swig-python | |
5d61105f | 32 | %if 0 && %{with apidocs} |
00466f31 | 33 | # no docs Makefile up to 3.2.24 |
5aedace1 JB |
34 | BuildRequires: asciidoc >= 8.6.5 |
35 | BuildRequires: asciidoc-filter-mscgen >= 1.2 | |
1e4369d7 | 36 | BuildRequires: doxygen >= 1.8.0 |
5050e1b7 | 37 | BuildRequires: graphviz |
5aedace1 JB |
38 | BuildRequires: mscgen |
39 | BuildRequires: python-pygments | |
5050e1b7 | 40 | BuildRequires: source-highlight |
5aedace1 JB |
41 | BuildRequires: tetex-dvips |
42 | BuildRequires: tetex-format-latex | |
5aedace1 | 43 | %endif |
822efbf9 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
47 | libnl is a library for applications dealing with netlink socket. It | |
48 | provides an easy to use interface for raw netlink message but also | |
49 | netlink family specific APIs. | |
50 | ||
1568cddb | 51 | %description -l pl.UTF-8 |
3bd3131a ER |
52 | libnl jest biblioteką dla aplikacji rozmawiających z gniazdem netlink. |
53 | Udostępnia łatwy w użyciu interfejs do korzystania z surowych | |
54 | wiadomości netlink, a także API specyficzne dla rodziny gniazd | |
55 | netlink. | |
822efbf9 | 56 | |
57 | %package devel | |
58 | Summary: Header files for libnl library | |
cd2b2b50 | 59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnl |
822efbf9 | 60 | Group: Development/Libraries |
d4594fac | 61 | Requires: %{name} = %{epoch}:%{version}-%{release} |
822efbf9 | 62 | |
63 | %description devel | |
64 | Header files for libnl library. | |
65 | ||
1568cddb JR |
66 | %description devel -l pl.UTF-8 |
67 | Pliki nagłówkowe biblioteki libnl. | |
822efbf9 | 68 | |
69 | %package static | |
70 | Summary: Static libnl library | |
cd2b2b50 | 71 | Summary(pl.UTF-8): Statyczna biblioteka libnl |
822efbf9 | 72 | Group: Development/Libraries |
d4594fac | 73 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
822efbf9 | 74 | |
75 | %description static | |
76 | Static libnl library. | |
77 | ||
1568cddb | 78 | %description static -l pl.UTF-8 |
822efbf9 | 79 | Statyczna biblioteka libnl. |
80 | ||
193bd36d ER |
81 | %package apidocs |
82 | Summary: libnl library API documentation | |
0414ac96 | 83 | Summary(pl.UTF-8): Dokumentacja API biblioteki libnl |
193bd36d | 84 | Group: Documentation |
62a8b2b3 ER |
85 | %if "%{_rpmversion}" >= "5" |
86 | BuildArch: noarch | |
87 | %endif | |
193bd36d ER |
88 | |
89 | %description apidocs | |
90 | Documentation for libnl library API and guides in HTML format | |
91 | generated from sources by doxygen. | |
92 | ||
0414ac96 JB |
93 | %description apidocs -l pl.UTF-8 |
94 | Dokumentacja API biblioteki libnl oraz wprowadzenie w formacie HTML | |
95 | wygenerowane ze źródeł za pomocą doxygena. | |
96 | ||
5aedace1 JB |
97 | %package -n python-netlink |
98 | Summary: Python wrapper for netlink protocols | |
99 | Summary(pl.UTF-8): Pythonowy interfejs do protokołów netlink | |
100 | Group: Libraries/Python | |
101 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
102 | ||
103 | %description -n python-netlink | |
104 | Python wrapper for netlink protocols. | |
105 | ||
106 | %description -n python-netlink -l pl.UTF-8 | |
107 | Pythonowy interfejs do protokołów netlink. | |
108 | ||
822efbf9 | 109 | %prep |
5d61105f | 110 | %setup -q -a1 |
5050e1b7 | 111 | mv -f libnl-doc-%{version} doc |
5aedace1 | 112 | %patch0 -p1 |
b56ad239 | 113 | %patch1 -p1 |
822efbf9 | 114 | |
115 | %build | |
5aedace1 JB |
116 | %{__libtoolize} |
117 | %{__aclocal} -I m4 | |
118 | %{__autoconf} | |
119 | %{__autoheader} | |
120 | %{__automake} | |
822efbf9 | 121 | %configure \ |
5050e1b7 | 122 | %{!?with_apidocs:--disable-doc} \ |
9b9efe4a | 123 | --disable-silent-rules |
1a633036 | 124 | |
822efbf9 | 125 | %{__make} |
5d61105f JB |
126 | |
127 | %if 0 | |
e49bc2c6 | 128 | # no docs Makefile up to 3.2.25 |
5aedace1 | 129 | %{?with_apidocs:%{__make} -j1 -C doc gendoc} |
5d61105f | 130 | %endif |
5aedace1 JB |
131 | |
132 | cd python | |
133 | CFLAGS="%{rpmcflags}" \ | |
134 | LDFLAGS="%{rpmldflags} -L$(pwd)/../lib/.libs" \ | |
135 | %{__python} setup.py build | |
822efbf9 | 136 | |
85272a9d JB |
137 | %{?with_tests:%{__make} check} |
138 | ||
822efbf9 | 139 | %install |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
5aedace1 JB |
145 | cd python |
146 | %{__python} setup.py install \ | |
147 | --optimize=2 \ | |
148 | --root=$RPM_BUILD_ROOT | |
149 | %py_postclean | |
150 | ||
151 | # dynamic modules | |
9b9efe4a | 152 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl/cli/*/*.{la,a} |
95369c27 | 153 | |
822efbf9 | 154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %post -p /sbin/ldconfig | |
158 | %postun -p /sbin/ldconfig | |
159 | ||
160 | %files | |
161 | %defattr(644,root,root,755) | |
162 | %doc ChangeLog | |
9b9efe4a JB |
163 | %dir %{_sysconfdir}/libnl |
164 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libnl/classid | |
165 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libnl/pktloc | |
1e4369d7 | 166 | %attr(755,root,root) %{_sbindir}/genl-ctrl-list |
9b9efe4a JB |
167 | %attr(755,root,root) %{_sbindir}/nl-class-* |
168 | %attr(755,root,root) %{_sbindir}/nl-classid-lookup | |
169 | %attr(755,root,root) %{_sbindir}/nl-cls-* | |
170 | %attr(755,root,root) %{_sbindir}/nl-link-list | |
171 | %attr(755,root,root) %{_sbindir}/nl-pktloc-lookup | |
172 | %attr(755,root,root) %{_sbindir}/nl-qdisc-* | |
e4b3eb9f | 173 | %attr(755,root,root) %{_libdir}/libnl-3.so.*.*.* |
c808b690 | 174 | %attr(755,root,root) %ghost %{_libdir}/libnl-3.so.200 |
e4b3eb9f | 175 | %attr(755,root,root) %{_libdir}/libnl-cli-3.so.*.*.* |
c808b690 | 176 | %attr(755,root,root) %ghost %{_libdir}/libnl-cli-3.so.200 |
e4b3eb9f | 177 | %attr(755,root,root) %{_libdir}/libnl-genl-3.so.*.*.* |
c808b690 | 178 | %attr(755,root,root) %ghost %{_libdir}/libnl-genl-3.so.200 |
85272a9d JB |
179 | %attr(755,root,root) %{_libdir}/libnl-idiag-3.so.*.*.* |
180 | %attr(755,root,root) %ghost %{_libdir}/libnl-idiag-3.so.200 | |
e4b3eb9f | 181 | %attr(755,root,root) %{_libdir}/libnl-nf-3.so.*.*.* |
c808b690 | 182 | %attr(755,root,root) %ghost %{_libdir}/libnl-nf-3.so.200 |
e4b3eb9f | 183 | %attr(755,root,root) %{_libdir}/libnl-route-3.so.*.*.* |
c808b690 | 184 | %attr(755,root,root) %ghost %{_libdir}/libnl-route-3.so.200 |
9b9efe4a JB |
185 | %dir %{_libdir}/libnl |
186 | %dir %{_libdir}/libnl/cli | |
187 | %dir %{_libdir}/libnl/cli/cls | |
bdcceed5 | 188 | %attr(755,root,root) %{_libdir}/libnl/cli/cls/*.so |
9b9efe4a | 189 | %dir %{_libdir}/libnl/cli/qdisc |
bdcceed5 | 190 | %attr(755,root,root) %{_libdir}/libnl/cli/qdisc/*.so |
1e4369d7 | 191 | %{_mandir}/man8/genl-ctrl-list.8* |
9b9efe4a JB |
192 | %{_mandir}/man8/nl-classid-lookup.8* |
193 | %{_mandir}/man8/nl-pktloc-lookup.8* | |
194 | %{_mandir}/man8/nl-qdisc-*.8* | |
822efbf9 | 195 | |
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
e4b3eb9f JB |
198 | %attr(755,root,root) %{_libdir}/libnl-3.so |
199 | %attr(755,root,root) %{_libdir}/libnl-cli-3.so | |
200 | %attr(755,root,root) %{_libdir}/libnl-genl-3.so | |
85272a9d | 201 | %attr(755,root,root) %{_libdir}/libnl-idiag-3.so |
e4b3eb9f JB |
202 | %attr(755,root,root) %{_libdir}/libnl-nf-3.so |
203 | %attr(755,root,root) %{_libdir}/libnl-route-3.so | |
e4b3eb9f JB |
204 | %{_libdir}/libnl-3.la |
205 | %{_libdir}/libnl-cli-3.la | |
206 | %{_libdir}/libnl-genl-3.la | |
85272a9d | 207 | %{_libdir}/libnl-idiag-3.la |
e4b3eb9f JB |
208 | %{_libdir}/libnl-nf-3.la |
209 | %{_libdir}/libnl-route-3.la | |
210 | %{_includedir}/libnl3 | |
211 | %{_pkgconfigdir}/libnl-3.0.pc | |
8d150739 | 212 | %{_pkgconfigdir}/libnl-cli-3.0.pc |
e4b3eb9f JB |
213 | %{_pkgconfigdir}/libnl-genl-3.0.pc |
214 | %{_pkgconfigdir}/libnl-nf-3.0.pc | |
215 | %{_pkgconfigdir}/libnl-route-3.0.pc | |
f123b212 PZ |
216 | |
217 | %files static | |
218 | %defattr(644,root,root,755) | |
e4b3eb9f JB |
219 | %{_libdir}/libnl-3.a |
220 | %{_libdir}/libnl-cli-3.a | |
221 | %{_libdir}/libnl-genl-3.a | |
85272a9d | 222 | %{_libdir}/libnl-idiag-3.a |
e4b3eb9f JB |
223 | %{_libdir}/libnl-nf-3.a |
224 | %{_libdir}/libnl-route-3.a | |
2ec5cf8c ER |
225 | |
226 | %if %{with apidocs} | |
227 | %files apidocs | |
228 | %defattr(644,root,root,755) | |
5050e1b7 | 229 | %doc doc/{*.html,libnl.css,api,images,stylesheets} |
2ec5cf8c | 230 | %endif |
5aedace1 JB |
231 | |
232 | %files -n python-netlink | |
233 | %defattr(644,root,root,755) | |
234 | %dir %{py_sitedir}/netlink | |
235 | %attr(755,root,root) %{py_sitedir}/netlink/_capi.so | |
236 | %{py_sitedir}/netlink/*.py[co] | |
85272a9d JB |
237 | %dir %{py_sitedir}/netlink/genl |
238 | %attr(755,root,root) %{py_sitedir}/netlink/genl/_capi.so | |
239 | %{py_sitedir}/netlink/genl/*.py[co] | |
5aedace1 JB |
240 | %dir %{py_sitedir}/netlink/route |
241 | %attr(755,root,root) %{py_sitedir}/netlink/route/_capi.so | |
242 | %{py_sitedir}/netlink/route/*.py[co] | |
243 | %dir %{py_sitedir}/netlink/route/links | |
244 | %{py_sitedir}/netlink/route/links/*.py[co] | |
245 | %dir %{py_sitedir}/netlink/route/qdisc | |
246 | %{py_sitedir}/netlink/route/qdisc/*.py[co] | |
247 | %{py_sitedir}/netlink-1.0-py*.egg-info |