3 %bcond_without apidocs # do not build and package API docs
4 %bcond_without static_libs # don't build static libraries
6 Summary: A minimalistic user-space library oriented to Netlink developers
7 Summary(pl.UTF-8): Minimalistyczna biblioteka przestrzeni użytkownika dla programistów Netlinka
13 Source0: http://www.netfilter.org/projects/libmnl/files/%{name}-%{version}.tar.bz2
14 # Source0-md5: 0bbb70573119ec5d49435114583e7a49
15 URL: http://www.netfilter.org/projects/libmnl/index.html
16 BuildRequires: autoconf >= 2.50
17 BuildRequires: automake >= 1.6
18 %{?with_apidocs:BuildRequires: doxygen}
19 BuildRequires: libtool >= 2:2
20 BuildRequires: rpm-build >= 4.6
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 libmnl is a minimalistic user-space library oriented to Netlink
25 developers. There are a lot of common tasks in parsing, validating,
26 constructing of both the Netlink header and TLVs that are repetitive
27 and easy to get wrong. This library aims to provide simple helpers
28 that allows you to re-use code and to avoid re-inventing the wheel.
29 The main features of this library are:
31 - Small: the shared library requires around 30kB for an x86-based
33 - Simple: this library avoids complexity and elaborated abstractions
34 that tend to hide Netlink details.
35 - Easy to use: the library simplifies the work for Netlink-wise
36 developers. It provides functions to make socket handling, message
37 building, validating, parsing and sequence tracking, easier.
38 - Easy to re-use: you can use the library to build your own
39 abstraction layer on top of this library.
40 - Decoupling: the interdependency of the main bricks that compose the
41 library is reduced, i.e. the library provides many helpers, but the
42 programmer is not forced to use them.
44 %description -l pl.UTF-8
45 libmnl to minimalistyczna biblioteka przestrzeni użytkownika
46 przeznaczona dla programistów interfejsu Netlink. Wiele wspólnych
47 zadań, takich jak analiza, sprawdzanie poprawności i tworzenie zarówno
48 nagłówka Netlink, jak i TLV jest powtarzalnych i łatwo w nich o błędy.
49 Ta biblioteka ma na celu dostarczenie prostych funkcji pomocniczych,
50 pozwalających wykorzystywać ten sam kod i zapobiegająca wynajdowaniu
51 koła na nowo. Główne cechy tej biblioteki to:
52 - mały rozmiar: biblioteka współdzielona dla x86 wymaga ok. 30kB
53 - prostota: biblioteka unika złożoności i szczegółowych abstrakcji,
54 które kryją się w szczegółach Netlinka
55 - łatwość użycia: biblioteka upraszcza pracę programistów interfejsu
56 Netlink; dostarcza funkcje ułatwiające obsługę gniazd, tworzenie
57 komunikatów, sprawdzanie poprawności, analizę i śledzenie sekwencji
58 - łatwość ponownego wykorzystania: biblioteki można użyć do stworzenia
59 własnej warstwy abstrakcji poziom wyżej
60 - niezależność: zależności między poszczególnymi elementami biblioteki
61 są ograniczone, tzn. biblioteka udostępnia wiele funkcji pomocniczych,
62 ale programista nie musi używać ich wszystkich.
65 Summary: Header files for libmnl library
66 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libmnl
67 Group: Development/Libraries
68 Requires: %{name} = %{version}-%{release}
71 Header files for libmnl library.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki libmnl.
77 Summary: Static libmnl library
78 Summary(pl.UTF-8): Statyczna biblioteka libmnl
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
83 Static libmnl library.
85 %description static -l pl.UTF-8
86 Statyczna biblioteka libmnl.
89 Summary: libmnl API documentation
90 Summary(pl.UTF-8): Dokumentacja API biblioteki libmnl
95 API and internal documentation for libmnl library.
97 %description apidocs -l pl.UTF-8
98 Dokumentacja API biblioteki libmnl.
110 --disable-silent-rules \
111 %{?with_static_libs:--enable-static} \
112 %{!?with_apidocs:--without-doxygen}
114 %{?with_apidocs:doxygen doxygen.cfg}
117 rm -rf $RPM_BUILD_ROOT
120 DESTDIR=$RPM_BUILD_ROOT
123 rm -rf $RPM_BUILD_ROOT
125 %post -p /sbin/ldconfig
126 %postun -p /sbin/ldconfig
129 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_libdir}/libmnl.so.*.*.*
132 %attr(755,root,root) %ghost %{_libdir}/libmnl.so.0
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_libdir}/libmnl.so
138 %{_includedir}/libmnl
139 %{_pkgconfigdir}/libmnl.pc
141 %if %{with static_libs}
143 %defattr(644,root,root,755)
149 %defattr(644,root,root,755)