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