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