]> git.pld-linux.org Git - packages/nftables.git/blame - nftables.spec
- updated to 0.9.8
[packages/nftables.git] / nftables.spec
CommitLineData
19bb6686
JP
1#
2# Conditional build:
3%bcond_without systemd # without systemd unit
4
f4e8c132
JB
5Summary: Administration tool for packet filtering and classification
6Summary(pl.UTF-8): Narzędzie administracyjne do filtrowania i klasyfikacji pakietów
7Name: nftables
1bd197c2 8Version: 0.9.8
e8d710b4 9Release: 1
f4e8c132
JB
10License: GPL v2
11Group: Applications/Networking
4e4aed31 12Source0: https://netfilter.org/projects/nftables/files/%{name}-%{version}.tar.bz2
1bd197c2 13# Source0-md5: 77bf0bd43e65e92212fc73139a2e47fc
19bb6686
JP
14Source1: %{name}.service
15Source2: %{name}.conf
cf7ed850 16Patch0: %{name}-python.patch
4e4aed31 17URL: https://netfilter.org/projects/nftables/
e8d710b4 18BuildRequires: asciidoc
f4e8c132 19BuildRequires: autoconf >= 2.61
09b93bc2 20BuildRequires: automake >= 1.6
f4e8c132 21BuildRequires: bison
f4e8c132
JB
22BuildRequires: flex
23BuildRequires: gmp-devel
435e9057 24BuildRequires: iptables-devel >= 1.6.1
163d1557 25BuildRequires: jansson-devel
aa5e3930 26BuildRequires: libmnl-devel >= 1.0.4
1bd197c2 27BuildRequires: libnftnl-devel >= 1.1.9
c5846f36 28BuildRequires: libtool >= 2:2
7be40d4e 29BuildRequires: pkgconfig
cf7ed850 30BuildRequires: python-modules >= 1:2.5
f4e8c132 31BuildRequires: readline-devel
cf7ed850
JB
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.219
435e9057 34Requires: iptables-libs >= 1.6.1
aa5e3930 35Requires: libmnl >= 1.0.4
1bd197c2 36Requires: libnftnl >= 1.1.9
19bb6686 37%{?with_systemd:Requires: systemd-units >= 38}
f4e8c132
JB
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41nftables is the project that aims to replace the existing
42{ip,ip6,arp,eb}tables framework. Basically, this project provides a
43new packet filtering framework, a new userspace utility and also a
44compatibility layer for {ip,ip6}tables. nftables is built upon the
45building blocks of the Netfilter infrastructure such as the existing
46hooks, the connection tracking system, the userspace queueing
47component and the logging subsystem.
48
49%description -l pl.UTF-8
50nftables to projekt mający na celu zastąpienie istniejącego szkieletu
51{ip,ip6,arp,eb}tables. Ten projekt przede wszystkim dostarcza nowy
52szkielet filtrowania, nowe narzędzie linii poleceń oraz warstwę
53zgodności dla {ip,ip6}tables. nftables jest zbudowane w oparciu o
54bloki tworzące infrastrukturę Netfilter, takie jak istniejące uchwyty,
55system śledzenia połączeń, komponent kolejkowania w przestrzeni
56użytkownika oraz podsystem logowania.
57
163d1557
JB
58%package devel
59Summary: Header file for nftables library
60Summary(pl.UTF-8): Plik nagłówkowy biblioteki nftables
61Group: Development/Libraries
62Requires: %{name} = %{version}-%{release}
63
64%description devel
65Header file for nftables library.
66
67%description devel -l pl.UTF-8
68Plik nagłówkowy biblioteki nftables.
69
70%package static
71Summary: Static nftables library
72Summary(pl.UTF-8): Statyczna biblioteka nftables
73Group: Development/Libraries
74Requires: %{name}-devel = %{version}-%{release}
75
76%description static
77Static nftables library.
78
79%description static -l pl.UTF-8
80Statyczna biblioteka nftables.
81
cf7ed850
JB
82%package -n python-nftables
83Summary: Python bindings for libnftables library
84Summary(pl.UTF-8): Wiązania Pythona do biblioteki libnftables
85Group: Libraries/Python
86Requires: %{name} = %{version}-%{release}
87
88%description -n python-nftables
89Python bindings for libnftables library.
90
91%description -n python-nftables -l pl.UTF-8
92Wiązania Pythona do biblioteki libnftables.
93
f4e8c132
JB
94%prep
95%setup -q
cf7ed850 96%patch0 -p1
f4e8c132
JB
97
98%build
4e4aed31 99%{__libtoolize}
09b93bc2 100%{__aclocal} -I m4
f4e8c132 101%{__autoconf}
09b93bc2
JB
102%{__autoheader}
103%{__automake}
f4e8c132 104%configure \
435e9057 105 --disable-silent-rules \
163d1557 106 --with-json \
435e9057 107 --with-xtables
f4e8c132
JB
108
109%{__make}
110
111%install
112rm -rf $RPM_BUILD_ROOT
113
9f8e3e09 114install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
19bb6686 115
f4e8c132
JB
116%{__make} install \
117 DESTDIR=$RPM_BUILD_ROOT
118
9f8e3e09
JB
119cp %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nftables
120%{__sed} -i -e 's|@NFT@|%{_sbindir}/nft|' \
121 $RPM_BUILD_ROOT/etc/sysconfig/nftables
19bb6686
JP
122
123%if %{with systemd}
124cp %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}
9f8e3e09 125%{__sed} -i -e '{
19bb6686 126 s|@NFT@|%{_sbindir}/nft|
9f8e3e09 127 s|@CONF@|/etc/sysconfig/nftables|
19bb6686
JP
128}' \
129 $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
130%endif
131
163d1557
JB
132# obsoleted by pkg-config
133%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnftables.la
134
cf7ed850
JB
135%py_postclean
136
f4e8c132
JB
137%clean
138rm -rf $RPM_BUILD_ROOT
139
19bb6686
JP
140%post
141/sbin/ldconfig
142%{?with_systemd:%systemd_post %{name}.service}
143
144%preun
145%{?with_systemd:%systemd_preun %{name}.service}
146
147%postun
148/sbin/ldconfig
149%{?with_systemd:%systemd_reload}
150
163d1557 151
f4e8c132
JB
152%files
153%defattr(644,root,root,755)
f4e8c132 154%attr(755,root,root) %{_sbindir}/nft
163d1557
JB
155%dir %{_sysconfdir}/nftables
156%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/all-in-one.nft
157%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/arp-filter.nft
158%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/bridge-filter.nft
159%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/inet-filter.nft
c5846f36 160%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/inet-nat.nft
163d1557
JB
161%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv4-filter.nft
162%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv4-mangle.nft
163%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv4-nat.nft
164%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv4-raw.nft
165%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-filter.nft
166%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-mangle.nft
167%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-nat.nft
168%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/ipv6-raw.nft
c5846f36 169%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/netdev-ingress.nft
cf7ed850
JB
170%dir %{_sysconfdir}/nftables/osf
171%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nftables/osf/pf.os
9f8e3e09 172%attr(740,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nftables
163d1557 173%attr(755,root,root) %{_libdir}/libnftables.so.*.*.*
cf7ed850 174%attr(755,root,root) %ghost %{_libdir}/libnftables.so.1
388b512c 175%doc %{_docdir}/nftables
cf7ed850 176%{_mandir}/man5/libnftables-json.5*
f4e8c132 177%{_mandir}/man8/nft.8*
19bb6686 178%{?with_systemd:%{systemdunitdir}/%{name}.service}
163d1557
JB
179
180%files devel
181%defattr(644,root,root,755)
182%attr(755,root,root) %{_libdir}/libnftables.so
183%{_includedir}/nftables
184%{_pkgconfigdir}/libnftables.pc
cf7ed850 185%{_mandir}/man3/libnftables.3*
163d1557
JB
186
187%files static
188%defattr(644,root,root,755)
189%{_libdir}/libnftables.a
cf7ed850
JB
190
191%files -n python-nftables
192%defattr(644,root,root,755)
193%dir %{py_sitedir}/nftables
194%{py_sitedir}/nftables/*.py[co]
195%{py_sitedir}/nftables/schema.json
196%{py_sitedir}/nftables-0.1-py*.egg-info
This page took 0.109526 seconds and 4 git commands to generate.