3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static libraries
5 %bcond_without jansson # JSON parsing support (via jansson)
6 %bcond_without mxml # XML parsing support (via mxml)
8 Summary: Netfilter nf_tables infrastructure library
9 Summary(pl.UTF-8): Biblioteka infrastruktury nf_tables netfiltra
15 Source0: http://www.netfilter.org/projects/libnftnl/files/%{name}-%{version}.tar.bz2
16 # Source0-md5: 1d3ee76b976c4a0ca233d5d5734f2728
17 URL: http://www.netfilter.org/projects/libnftnl/
18 BuildRequires: autoconf >= 2.50
19 BuildRequires: automake >= 1.6
20 %{?with_apidocs:BuildRequires: doxygen}
21 %{?with_jansson:BuildRequires: jansson-devel >= 2.3}
22 BuildRequires: libmnl-devel >= 1.0.0
23 BuildRequires: libtool >= 2:2
24 BuildRequires: linux-libc-headers >= 7:3.14
25 %{?with_mxml:BuildRequires: mxml-devel >= 2.6}
26 %{?with_jansson:Requires: jansson >= 2.3}
27 Requires: libmnl >= 1.0.0
28 %{?with_mxml:Requires: mxml >= 2.6}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 libnftnl is a userspace library providing a low-level netlink
33 programming interface (API) to the in-kernel nf_tables subsystem. The
34 library libnftnl has been previously known as libnftables. This
35 library is currently used by nftables.
37 %description -l pl.UTF-8
38 libnftnl to biblioteka przestrzeni użytkownika udostępniająca
39 niskopoziomowy interfejs programistyczny (API) netlink do podsystemu
40 nf_tables w jądrze. Wcześniej biblioteka nazywała się libnftables.
41 Jest obecnie używana przez narzędzie nftables.
44 Summary: Header files for libnftnl library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnftnl
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: libmnl-devel >= 1.0.0
51 Header files for libnftnl library.
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki libnftnl.
57 Summary: Static libnftnl library
58 Summary(pl.UTF-8): Statyczna biblioteka libnftnl
59 Group: Development/Libraries
60 Requires: %{name}-devel = %{version}-%{release}
63 Static libnftnl library.
65 %description static -l pl.UTF-8
66 Statyczna biblioteka libnftnl.
69 Summary: libnftnl API documentation
70 Summary(pl.UTF-8): Dokumentacja API biblioteki libnftnl
74 API and internal documentation for libnftnl library.
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API biblioteki libnftnl.
89 --disable-silent-rules \
90 %{?with_static_libs:--enable-static} \
91 %{?with_jansson:--with-json-parsing} \
92 %{?with_mxml:--with-xml-parsing}
96 %{?with_apidocs:doxygen doxygen.cfg}
99 rm -rf $RPM_BUILD_ROOT
102 DESTDIR=$RPM_BUILD_ROOT
104 # obsoleted by pkg-config
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftnl.la
108 rm -rf $RPM_BUILD_ROOT
110 %post -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/libnftnl.so.*.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libnftnl.so.0
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libnftnl.so
121 %{_includedir}/libnftnl
122 %{_pkgconfigdir}/libnftnl.pc
124 %if %{with static_libs}
126 %defattr(644,root,root,755)
127 %{_libdir}/libnftnl.a
132 %defattr(644,root,root,755)