142 lines
4.1 KiB
RPMSpec
142 lines
4.1 KiB
RPMSpec
Name: nftables
|
|
Version: 1.1.0
|
|
Release: 1mamba
|
|
Summary: Netfilter tables userspace tools
|
|
Group: Network/Security
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://netfilter.org/projects/nftables/index.html
|
|
Source: https://netfilter.org/projects/nftables/files/nftables-%{version}.tar.xz
|
|
Source1: nftables.conf
|
|
Source2: nftables.service
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libgmp-devel
|
|
BuildRequires: libjansson-devel
|
|
BuildRequires: libmnl-devel
|
|
BuildRequires: libnftnl-devel
|
|
BuildRequires: libpython311-devel
|
|
BuildRequires: libreadline-devel
|
|
## AUTOBUILDREQ-END
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description
|
|
nftables replaces the popular {ip,ip6,arp,eb}tables. This software provides a new in-kernel packet classification framework that is based on a network-specific Virtual Machine (VM) and a new nft userspace command line tool. nftables reuses the existing Netfilter subsystems such as the existing hook infrastructure, the connection tracking system, NAT, userspace queueing and logging subsystem.
|
|
|
|
%package -n lib%{name}
|
|
Group: System/Libraries
|
|
Summary: Shared libraries for %{name}
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description -n lib%{name}
|
|
This package contains shared libraries for %{name}.
|
|
|
|
%package -n lib%{name}-devel
|
|
Group: Development/Libraries
|
|
Summary: Development files for %{name}
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Requires: pkg-config
|
|
|
|
%description -n lib%{name}-devel
|
|
This package contains libraries and header files for developing applications that use %{name}.
|
|
|
|
%package -n python-nftables-py3
|
|
Group: System/Libraries/Python
|
|
Summary: Python bindings to %{name}
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Obsoletes: python-nftables-py310 < 1.1.0
|
|
|
|
%description -n python-nftables-py3
|
|
This package contains the Python bindings to %{name}.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%configure \
|
|
--with-json \
|
|
--with-cli=readline \
|
|
--disable-python
|
|
|
|
%make
|
|
|
|
# From Arch: Building the Python module separately due to the automatic build resulting
|
|
# in an incorrect directory structure and unimportable module (see FS#79229)
|
|
cd py
|
|
%{__python3} -m build --wheel --no-isolation
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall
|
|
|
|
%{__python3} -m installer --destdir=%{buildroot} py/dist/*.whl
|
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nftables/nftables.conf
|
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/nftables.service
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post -n lib%{name} -p /sbin/ldconfig
|
|
%postun -n lib%{name} -p /sbin/ldconfig
|
|
|
|
%post
|
|
%systemd_post nftables
|
|
:
|
|
|
|
%preun
|
|
%systemd_preun nftables
|
|
:
|
|
|
|
%postun
|
|
%systemd_postun_with_restart nftables
|
|
:
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %{_sysconfdir}/nftables/nftables.conf
|
|
%{_sysconfdir}/nftables/osf/pf.os
|
|
%{_sbindir}/nft
|
|
%{_unitdir}/nftables.service
|
|
%dir %{_docdir}/nftables
|
|
%dir %{_docdir}/nftables/examples
|
|
%{_docdir}/nftables/examples/*
|
|
%{_mandir}/man5/libnftables-json.5*
|
|
%{_mandir}/man8/nft.8*
|
|
%dir %{_datadir}/nftables
|
|
%{_datadir}/nftables/*.nft
|
|
|
|
%files -n lib%{name}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libnftables.so.*
|
|
%doc COPYING
|
|
|
|
%files -n lib%{name}-devel
|
|
%defattr(-,root,root)
|
|
%dir %{_includedir}/nftables
|
|
%{_includedir}/nftables/libnftables.h
|
|
%{_libdir}/libnftables.so
|
|
%{_libdir}/pkgconfig/libnftables.pc
|
|
%{_mandir}/man3/libnftables.3*
|
|
|
|
%files -n python-nftables-py3
|
|
%defattr(-,root,root)
|
|
%dir %{python3_sitelib}/nftables-*.dist-info
|
|
%{python3_sitelib}/nftables-*.dist-info/*
|
|
%dir %{python3_sitelib}/nftables
|
|
%{python3_sitelib}/nftables/*
|
|
|
|
%changelog
|
|
* Sat Aug 03 2024 Automatic Build System <autodist@openmamba.org> 1.1.0-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Oct 20 2023 Automatic Build System <autodist@mambasoft.it> 1.0.9-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Aug 12 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.8-1mamba
|
|
- package created using the webbuild interface
|