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