]> git.pld-linux.org Git - packages/libnftnl.git/blob - libnftnl.spec
- new
[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 %bcond_without  mxml            # XML parsing support (via mxml)
7 #
8 Summary:        Netfilter nf_tables infrastructure library
9 Summary(pl.UTF-8):      Biblioteka infrastruktury nf_tables netfiltra
10 Name:           libnftnl
11 Version:        1.0.1
12 Release:        1
13 License:        GPL v2+
14 Group:          Libraries
15 Source0:        http://www.netfilter.org/projects/libnftnl/files/%{name}-%{version}.tar.bz2
16 # Source0-md5:  2897fa44ff77de9144074467d37aaab3
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)
30
31 %description
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.
36
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.
42
43 %package devel
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
49
50 %description devel
51 Header files for libnftnl library.
52
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki libnftnl.
55
56 %package static
57 Summary:        Static libnftnl library
58 Summary(pl.UTF-8):      Statyczna biblioteka libnftnl
59 Group:          Development/Libraries
60 Requires:       %{name}-devel = %{version}-%{release}
61
62 %description static
63 Static libnftnl library.
64
65 %description static -l pl.UTF-8
66 Statyczna biblioteka libnftnl.
67
68 %package apidocs
69 Summary:        libnftnl API documentation
70 Summary(pl.UTF-8):      Dokumentacja API biblioteki libnftnl
71 Group:          Documentation
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         %{?with_mxml:--with-xml-parsing}
93
94 %{__make}
95
96 %{?with_apidocs:doxygen doxygen.cfg}
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 # obsoleted by pkg-config
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftnl.la
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
112
113 %files
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/libnftnl.so.*.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libnftnl.so.0
117
118 %files devel
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libnftnl.so
121 %{_includedir}/libnftnl
122 %{_pkgconfigdir}/libnftnl.pc
123
124 %if %{with static_libs}
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/libnftnl.a
128 %endif
129
130 %if %{with apidocs}
131 %files apidocs
132 %defattr(644,root,root,755)
133 %doc doxygen/html/*
134 %endif
This page took 0.118913 seconds and 3 git commands to generate.