]>
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 |
5d61105f | 8 | Version: 3.2.14 |
9e23f053 | 9 | Release: 1 |
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 |
5d61105f JB |
14 | # Source0-md5: 81d44f530aa0af1638a220c413baec05 |
15 | Source1: http://www.infradead.org/~tgr/libnl/files/%{name}-doc-%{version}.tar.gz | |
16 | # Source1-md5: 90ed59f501bf39ff58028ecbc8b6026d | |
5aedace1 | 17 | Patch0: %{name}-link.patch |
b56ad239 | 18 | Patch1: %{name}-pedantic.patch |
973a8511 | 19 | URL: http://www.infradead.org/~tgr/libnl/ |
5aedace1 JB |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
7f50b8be | 22 | BuildRequires: bison >= 2.4.0 |
7f50b8be | 23 | BuildRequires: flex >= 2.5.34 |
5aedace1 | 24 | BuildRequires: libtool |
3bd3131a | 25 | BuildRequires: linux-libc-headers >= 6:2.6.23 |
5aedace1 JB |
26 | BuildRequires: python-devel >= 1:2.6 |
27 | BuildRequires: rpmbuild(macros) >= 1.219 | |
28 | BuildRequires: swig-python | |
5d61105f JB |
29 | %if 0 && %{with apidocs} |
30 | # no docs sources in 3.2.14 | |
5aedace1 JB |
31 | BuildRequires: asciidoc >= 8.6.5 |
32 | BuildRequires: asciidoc-filter-mscgen >= 1.2 | |
1e4369d7 | 33 | BuildRequires: doxygen >= 1.8.0 |
5aedace1 JB |
34 | BuildRequires: mscgen |
35 | BuildRequires: python-pygments | |
36 | BuildRequires: tetex-dvips | |
37 | BuildRequires: tetex-format-latex | |
5aedace1 | 38 | %endif |
822efbf9 | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
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 |
5d61105f JB |
102 | %setup -q -a1 |
103 | mv -f libnl-doc-%{version} libnl-doc | |
5aedace1 | 104 | %patch0 -p1 |
b56ad239 | 105 | %patch1 -p1 |
822efbf9 | 106 | |
107 | %build | |
5aedace1 JB |
108 | %{__libtoolize} |
109 | %{__aclocal} -I m4 | |
110 | %{__autoconf} | |
111 | %{__autoheader} | |
112 | %{__automake} | |
822efbf9 | 113 | %configure \ |
9b9efe4a | 114 | --disable-silent-rules |
1a633036 | 115 | |
822efbf9 | 116 | %{__make} |
5d61105f JB |
117 | |
118 | %if 0 | |
119 | # no docs sources in 3.2.14 | |
5aedace1 | 120 | %{?with_apidocs:%{__make} -j1 -C doc gendoc} |
5d61105f | 121 | %endif |
5aedace1 JB |
122 | |
123 | cd python | |
124 | CFLAGS="%{rpmcflags}" \ | |
125 | LDFLAGS="%{rpmldflags} -L$(pwd)/../lib/.libs" \ | |
126 | %{__python} setup.py build | |
822efbf9 | 127 | |
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %{__make} install \ | |
132 | DESTDIR=$RPM_BUILD_ROOT | |
133 | ||
5aedace1 JB |
134 | cd python |
135 | %{__python} setup.py install \ | |
136 | --optimize=2 \ | |
137 | --root=$RPM_BUILD_ROOT | |
138 | %py_postclean | |
139 | ||
140 | # dynamic modules | |
9b9efe4a | 141 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl/cli/*/*.{la,a} |
95369c27 | 142 | |
822efbf9 | 143 | %clean |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %post -p /sbin/ldconfig | |
147 | %postun -p /sbin/ldconfig | |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
151 | %doc ChangeLog | |
9b9efe4a JB |
152 | %dir %{_sysconfdir}/libnl |
153 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libnl/classid | |
154 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libnl/pktloc | |
1e4369d7 | 155 | %attr(755,root,root) %{_sbindir}/genl-ctrl-list |
9b9efe4a JB |
156 | %attr(755,root,root) %{_sbindir}/nl-class-* |
157 | %attr(755,root,root) %{_sbindir}/nl-classid-lookup | |
158 | %attr(755,root,root) %{_sbindir}/nl-cls-* | |
159 | %attr(755,root,root) %{_sbindir}/nl-link-list | |
160 | %attr(755,root,root) %{_sbindir}/nl-pktloc-lookup | |
161 | %attr(755,root,root) %{_sbindir}/nl-qdisc-* | |
e4b3eb9f JB |
162 | %attr(755,root,root) %{_libdir}/libnl-3.so.*.*.* |
163 | %attr(755,root,root) %ghost %{_libdir}/libnl-3.so.200 | |
164 | %attr(755,root,root) %{_libdir}/libnl-cli-3.so.*.*.* | |
165 | %attr(755,root,root) %ghost %{_libdir}/libnl-cli-3.so.200 | |
166 | %attr(755,root,root) %{_libdir}/libnl-genl-3.so.*.*.* | |
167 | %attr(755,root,root) %ghost %{_libdir}/libnl-genl-3.so.200 | |
168 | %attr(755,root,root) %{_libdir}/libnl-nf-3.so.*.*.* | |
169 | %attr(755,root,root) %ghost %{_libdir}/libnl-nf-3.so.200 | |
170 | %attr(755,root,root) %{_libdir}/libnl-route-3.so.*.*.* | |
171 | %attr(755,root,root) %ghost %{_libdir}/libnl-route-3.so.200 | |
9b9efe4a JB |
172 | %dir %{_libdir}/libnl |
173 | %dir %{_libdir}/libnl/cli | |
174 | %dir %{_libdir}/libnl/cli/cls | |
bdcceed5 | 175 | %attr(755,root,root) %{_libdir}/libnl/cli/cls/*.so |
9b9efe4a | 176 | %dir %{_libdir}/libnl/cli/qdisc |
bdcceed5 | 177 | %attr(755,root,root) %{_libdir}/libnl/cli/qdisc/*.so |
1e4369d7 | 178 | %{_mandir}/man8/genl-ctrl-list.8* |
9b9efe4a JB |
179 | %{_mandir}/man8/nl-classid-lookup.8* |
180 | %{_mandir}/man8/nl-pktloc-lookup.8* | |
181 | %{_mandir}/man8/nl-qdisc-*.8* | |
822efbf9 | 182 | |
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
e4b3eb9f JB |
185 | %attr(755,root,root) %{_libdir}/libnl-3.so |
186 | %attr(755,root,root) %{_libdir}/libnl-cli-3.so | |
187 | %attr(755,root,root) %{_libdir}/libnl-genl-3.so | |
188 | %attr(755,root,root) %{_libdir}/libnl-nf-3.so | |
189 | %attr(755,root,root) %{_libdir}/libnl-route-3.so | |
e4b3eb9f JB |
190 | %{_libdir}/libnl-3.la |
191 | %{_libdir}/libnl-cli-3.la | |
192 | %{_libdir}/libnl-genl-3.la | |
193 | %{_libdir}/libnl-nf-3.la | |
194 | %{_libdir}/libnl-route-3.la | |
195 | %{_includedir}/libnl3 | |
196 | %{_pkgconfigdir}/libnl-3.0.pc | |
8d150739 | 197 | %{_pkgconfigdir}/libnl-cli-3.0.pc |
e4b3eb9f JB |
198 | %{_pkgconfigdir}/libnl-genl-3.0.pc |
199 | %{_pkgconfigdir}/libnl-nf-3.0.pc | |
200 | %{_pkgconfigdir}/libnl-route-3.0.pc | |
f123b212 PZ |
201 | |
202 | %files static | |
203 | %defattr(644,root,root,755) | |
e4b3eb9f JB |
204 | %{_libdir}/libnl-3.a |
205 | %{_libdir}/libnl-cli-3.a | |
206 | %{_libdir}/libnl-genl-3.a | |
207 | %{_libdir}/libnl-nf-3.a | |
208 | %{_libdir}/libnl-route-3.a | |
2ec5cf8c ER |
209 | |
210 | %if %{with apidocs} | |
211 | %files apidocs | |
212 | %defattr(644,root,root,755) | |
5d61105f | 213 | %doc libnl-doc/{*.html,libnl.css,api,images,stylesheets} |
2ec5cf8c | 214 | %endif |
5aedace1 JB |
215 | |
216 | %files -n python-netlink | |
217 | %defattr(644,root,root,755) | |
218 | %dir %{py_sitedir}/netlink | |
219 | %attr(755,root,root) %{py_sitedir}/netlink/_capi.so | |
220 | %{py_sitedir}/netlink/*.py[co] | |
221 | %dir %{py_sitedir}/netlink/route | |
222 | %attr(755,root,root) %{py_sitedir}/netlink/route/_capi.so | |
223 | %{py_sitedir}/netlink/route/*.py[co] | |
224 | %dir %{py_sitedir}/netlink/route/links | |
225 | %{py_sitedir}/netlink/route/links/*.py[co] | |
226 | %dir %{py_sitedir}/netlink/route/qdisc | |
227 | %{py_sitedir}/netlink/route/qdisc/*.py[co] | |
228 | %{py_sitedir}/netlink-1.0-py*.egg-info |