%bcond_with systemd Name: nftables Version: 1.0.9 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Summary: Netfilter Tables userspace utillites Group: system Vendor: Project Vine Distribution: Vine Linux License: GPLv2 URL: http://netfilter.org/projects/nftables/ Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.xz Source1: nftables.init Source2: nftables.conf Source3: main.nft Source4: router.nft Source5: nat.nft Source11: nftables.service #BuildRequires: autogen #BuildRequires: autoconf #BuildRequires: automake #BuildRequires: libtool BuildRequires: flex BuildRequires: bison BuildRequires: libmnl-devel BuildRequires: gmp-devel BuildRequires: readline-devel BuildRequires: libedit-devel BuildRequires: libnftnl-devel BuildRequires: asciidoc BuildRequires: docbook2X BuildRequires: jansson-devel BuildRequires: iptables-devel BuildRequires: python-rpm-macros %if %{with systemd} %{?systemd_requires} %else Requires(post): chkconfig Requires(preun): chkconfig %endif %description Netfilter Tables userspace utilities. %package devel Summary: Development library for nftables / libnftables Group: programming Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel Development tools and static libraries and header files for the libnftables library. %debug_package %prep #setup -q -n nftables-%{snapdate} %setup -q %build #./autogen.sh %configure \ --disable-silent-rules \ --with-xtables \ --with-json \ --enable-python=no make %{?_smp_mflags} %install %make_install find %{buildroot} -name '*.la' -exec rm -f {} ';' chmod 644 %{buildroot}/%{_mandir}/man8/nft* # Don't ship static lib (for now at least) rm -f $RPM_BUILD_ROOT/%{_libdir}/libnftables.a # drop vendor-provided configs, they are not really useful rm -f $RPM_BUILD_ROOT/%{_datadir}/nftables/*.nft chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft* %if %{with systemd} mkdir -p $RPM_BUILD_ROOT/%{_unitdir} cp -a %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/ %else mkdir -p $RPM_BUILD_ROOT/%{_initdir} install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initdir}/nftables %endif mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/ chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/nftables.conf mkdir -m 700 -p $RPM_BUILD_ROOT/%{_sysconfdir}/nftables cp %{SOURCE3} %{SOURCE4} %{SOURCE5} \ $RPM_BUILD_ROOT/%{_sysconfdir}/nftables/ find $RPM_BUILD_ROOT/%{_sysconfdir} -type f -exec chmod 0600 {} \; rm -rf %{buildroot}%{python_sitelib}/* %post %if %{with systemd} %systemd_post nftables.service %else /sbin/chkconfig --add nftables %endif %preun %if %{with systemd} %systemd_preun nftables.service %else if [ "$1" = 0 ]; then /sbin/chkconfig --del nftables fi %endif %if %{with systemd} %postun %systemd_postun_with_restart nftables.service %endif %files %license COPYING %doc %{_docdir}/nftables/examples %config(noreplace) %{_sysconfdir}/nftables/ %config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf %{_libdir}/*.so.* %{_sbindir}/nft %{_mandir}/man5/libnftables-json* %{_mandir}/man8/nft* %if %{with systemd} %{_unitdir}/nftables.service %else %{_initdir}/nftables %endif %files devel %{_libdir}/pkgconfig/*.pc %{_libdir}/*.so %{_includedir}/* %{_mandir}/man3/libnftables* %changelog * Fri Oct 20 2023 Tomohiro "Tomo-p" KATO 1.0.9-1 - new upstream release. * Mon Sep 02 2019 Tomohiro "Tomo-p" KATO 0.9.2-1 - new upstream release. * Sun Feb 25 2018 Tomohiro "Tomo-p" KATO 0.8.2-1 - new upstream release. - dropped Patch0: fixed in upstream. * Sat Sep 5 2015 Ryoichi INAGAKI 0.4-4 - added Group tag * Wed Jul 8 2015 Tomohiro "Tomo-p" KATO 0.4-3 - initial build for Vine Linux. * Sat Jan 10 2015 Kevin Fenzi 0.4-2 - Add patch to fix nft -f dep gen. * Fri Dec 26 2014 Kevin Fenzi 0.4-1 - Update to 0.4 - Add Epoch to fix versioning. * Wed Sep 03 2014 Kevin Fenzi 0.100-4.20140903git - Update to 20140903 snapshot * Sun Aug 17 2014 Fedora Release Engineering - 0.100-4.20140704git - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Fri Jul 04 2014 Kevin Fenzi 0.100-3.20140704git - Update to new snapshot * Sat Jun 07 2014 Fedora Release Engineering - 0.100-2.20140426git - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Apr 26 2014 Kevin Fenzi 0.100-1.20140426git - Update t0 20140426 * Sun Mar 30 2014 Kevin Fenzi 0.100-1.20140330git - Update to 20140330 snapshot - Sync versions to be post 0.100 release. * Wed Mar 26 2014 Kevin Fenzi 0-0.7.20140326git - Update to 20140326 snapshot - Fix permissions on man pages. * Mon Mar 24 2014 Kevin Fenzi 0-0.6.20140324git - Update to 20140324 snapshot * Fri Mar 07 2014 Kevin Fenzi 0-0.5.20140307git - Update to 20140307 * Sat Jan 25 2014 Kevin Fenzi 0-0.4.20140125git - Update to 20140125 snapshot * Sat Jan 18 2014 Kevin Fenzi 0-0.3.20140118git - Update to 20140118 snapshot - Fixed License tag to be correct - Fixed changelog - nft scripts now use full path for nft - Fixed man page building - Dropped unneeded rm in install - Patched build to not be silent. * Tue Dec 03 2013 Kevin Fenzi 0-0.2.20131202git - Use upstream snapshots for source. - Use 0 for version. * Sat Nov 30 2013 Kevin Fenzi 0-0.1 - initial version for Fedora review