]> git.pld-linux.org Git - packages/libnftnl.git/blob - libnftnl.spec
- updated to 1.0.9
[packages/libnftnl.git] / libnftnl.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static libraries
5 %bcond_without  jansson         # JSON parsing support (via jansson)
6
7 Summary:        Netfilter nf_tables infrastructure library
8 Summary(pl.UTF-8):      Biblioteka infrastruktury nf_tables netfiltra
9 Name:           libnftnl
10 Version:        1.0.9
11 Release:        1
12 License:        GPL v2+
13 Group:          Libraries
14 Source0:        https://netfilter.org/projects/libnftnl/files/%{name}-%{version}.tar.bz2
15 # Source0-md5:  6c4f392faab5745933553b4354be5d8d
16 URL:            https://netfilter.org/projects/libnftnl/
17 BuildRequires:  autoconf >= 2.50
18 BuildRequires:  automake >= 1.6
19 %{?with_apidocs:BuildRequires:  doxygen}
20 %{?with_jansson:BuildRequires:  jansson-devel >= 2.3}
21 BuildRequires:  libmnl-devel >= 1.0.0
22 BuildRequires:  libtool >= 2:2
23 BuildRequires:  linux-libc-headers >= 7:3.14
24 %{?with_jansson:Requires:       jansson >= 2.3}
25 Requires:       libmnl >= 1.0.0
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 libnftnl is a userspace library providing a low-level netlink
30 programming interface (API) to the in-kernel nf_tables subsystem. The
31 library libnftnl has been previously known as libnftables. This
32 library is currently used by nftables.
33
34 %description -l pl.UTF-8
35 libnftnl to biblioteka przestrzeni użytkownika udostępniająca
36 niskopoziomowy interfejs programistyczny (API) netlink do podsystemu
37 nf_tables w jądrze. Wcześniej biblioteka nazywała się libnftables.
38 Jest obecnie używana przez narzędzie nftables.
39
40 %package devel
41 Summary:        Header files for libnftnl library
42 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libnftnl
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}-%{release}
45 Requires:       libmnl-devel >= 1.0.0
46
47 %description devel
48 Header files for libnftnl library.
49
50 %description devel -l pl.UTF-8
51 Pliki nagłówkowe biblioteki libnftnl.
52
53 %package static
54 Summary:        Static libnftnl library
55 Summary(pl.UTF-8):      Statyczna biblioteka libnftnl
56 Group:          Development/Libraries
57 Requires:       %{name}-devel = %{version}-%{release}
58
59 %description static
60 Static libnftnl library.
61
62 %description static -l pl.UTF-8
63 Statyczna biblioteka libnftnl.
64
65 %package apidocs
66 Summary:        libnftnl API documentation
67 Summary(pl.UTF-8):      Dokumentacja API biblioteki libnftnl
68 Group:          Documentation
69 %if "%{_rpmversion}" >= "5"
70 BuildArch:      noarch
71 %endif
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 \
90         %{?with_static_libs:--enable-static} \
91         %{?with_jansson:--with-json-parsing}
92
93 %{__make}
94
95 %{?with_apidocs:doxygen doxygen.cfg}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %{__make} install \
101         DESTDIR=$RPM_BUILD_ROOT
102
103 # obsoleted by pkg-config
104 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftnl.la
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %post   -p /sbin/ldconfig
110 %postun -p /sbin/ldconfig
111
112 %files
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/libnftnl.so.*.*.*
115 %attr(755,root,root) %ghost %{_libdir}/libnftnl.so.7
116
117 %files devel
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_libdir}/libnftnl.so
120 %{_includedir}/libnftnl
121 %{_pkgconfigdir}/libnftnl.pc
122
123 %if %{with static_libs}
124 %files static
125 %defattr(644,root,root,755)
126 %{_libdir}/libnftnl.a
127 %endif
128
129 %if %{with apidocs}
130 %files apidocs
131 %defattr(644,root,root,755)
132 %doc doxygen/html/*
133 %endif
This page took 0.065802 seconds and 3 git commands to generate.