]>
Commit | Line | Data |
---|---|---|
f435963c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static libraries | |
f40e880a | 5 | |
f435963c JB |
6 | Summary: Netfilter nf_tables infrastructure library |
7 | Summary(pl.UTF-8): Biblioteka infrastruktury nf_tables netfiltra | |
8 | Name: libnftnl | |
05eb3c84 | 9 | Version: 1.1.2 |
9baa6b34 | 10 | Release: 1 |
f435963c JB |
11 | License: GPL v2+ |
12 | Group: Libraries | |
f66a51b7 | 13 | Source0: https://netfilter.org/projects/libnftnl/files/%{name}-%{version}.tar.bz2 |
05eb3c84 | 14 | # Source0-md5: 14093a238d5025d4a452e6d1cef88c58 |
f66a51b7 | 15 | URL: https://netfilter.org/projects/libnftnl/ |
f435963c JB |
16 | BuildRequires: autoconf >= 2.50 |
17 | BuildRequires: automake >= 1.6 | |
18 | %{?with_apidocs:BuildRequires: doxygen} | |
990244c8 | 19 | BuildRequires: libmnl-devel >= 1.0.3 |
f435963c JB |
20 | BuildRequires: libtool >= 2:2 |
21 | BuildRequires: linux-libc-headers >= 7:3.14 | |
990244c8 | 22 | Requires: libmnl >= 1.0.3 |
f435963c JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | libnftnl is a userspace library providing a low-level netlink | |
27 | programming interface (API) to the in-kernel nf_tables subsystem. The | |
28 | library libnftnl has been previously known as libnftables. This | |
29 | library is currently used by nftables. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | libnftnl to biblioteka przestrzeni użytkownika udostępniająca | |
33 | niskopoziomowy interfejs programistyczny (API) netlink do podsystemu | |
34 | nf_tables w jądrze. Wcześniej biblioteka nazywała się libnftables. | |
35 | Jest obecnie używana przez narzędzie nftables. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for libnftnl library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnftnl | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
990244c8 | 42 | Requires: libmnl-devel >= 1.0.3 |
f435963c JB |
43 | |
44 | %description devel | |
45 | Header files for libnftnl library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki libnftnl. | |
49 | ||
50 | %package static | |
51 | Summary: Static libnftnl library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka libnftnl | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static libnftnl library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka libnftnl. | |
61 | ||
62 | %package apidocs | |
63 | Summary: libnftnl API documentation | |
64 | Summary(pl.UTF-8): Dokumentacja API biblioteki libnftnl | |
65 | Group: Documentation | |
f40e880a ER |
66 | %if "%{_rpmversion}" >= "5" |
67 | BuildArch: noarch | |
68 | %endif | |
f435963c JB |
69 | |
70 | %description apidocs | |
71 | API and internal documentation for libnftnl library. | |
72 | ||
73 | %description apidocs -l pl.UTF-8 | |
74 | Dokumentacja API biblioteki libnftnl. | |
75 | ||
76 | %prep | |
77 | %setup -q | |
78 | ||
79 | %build | |
80 | %{__libtoolize} | |
81 | %{__aclocal} -I m4 | |
82 | %{__autoconf} | |
83 | %{__autoheader} | |
84 | %{__automake} | |
85 | %configure \ | |
86 | --disable-silent-rules \ | |
05eb3c84 | 87 | %{?with_static_libs:--enable-static} |
f435963c JB |
88 | |
89 | %{__make} | |
90 | ||
91 | %{?with_apidocs:doxygen doxygen.cfg} | |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %{__make} install \ | |
97 | DESTDIR=$RPM_BUILD_ROOT | |
98 | ||
99 | # obsoleted by pkg-config | |
100 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftnl.la | |
101 | ||
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %post -p /sbin/ldconfig | |
106 | %postun -p /sbin/ldconfig | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
110 | %attr(755,root,root) %{_libdir}/libnftnl.so.*.*.* | |
05eb3c84 | 111 | %attr(755,root,root) %ghost %{_libdir}/libnftnl.so.11 |
f435963c JB |
112 | |
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
115 | %attr(755,root,root) %{_libdir}/libnftnl.so | |
116 | %{_includedir}/libnftnl | |
117 | %{_pkgconfigdir}/libnftnl.pc | |
118 | ||
119 | %if %{with static_libs} | |
120 | %files static | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libnftnl.a | |
123 | %endif | |
124 | ||
125 | %if %{with apidocs} | |
126 | %files apidocs | |
127 | %defattr(644,root,root,755) | |
128 | %doc doxygen/html/* | |
129 | %endif |