# For ART-build %define with_atomicscl %{?_with_atomicscl: 1} %{?!_with_atomicscl: 0} %if %{with_atomicscl} %global scl atomic-iptables %define _scl_prefix /opt/atomic %endif %if 0%{?scl:1} %scl_package iptables %else %global pkg_name %{name} %global _root_sysconfdir %{_sysconfdir} %global _root_bindir %{_bindir} %global _root_sbindir %{_sbindir} %global _root_includedir %{_includedir} %global _root_libdir %{_libdir} %global _root_prefix %{_prefix} %if 0%{?rhel} < 6 %global _root_initddir /etc %else %global _root_initddir %{_initddir} %endif %endif Name: %{?scl_prefix}iptables Summary: Tools for managing Linux kernel packet filtering capabilities Version: 1.4.21 Release: 0.8 Source: http://www.netfilter.org/projects/iptables/files/iptables-%{version}.tar.bz2 Source1: iptables.init Source2: iptables-config Patch1: iptables-1.4.21-rhbz_1054871.patch Patch2: iptables-1.4.21-libxt_cgroup.patch Patch3: iptables-1.4.21-wait_seconds.patch Patch4: iptables-1.4.21-flock_wait.patch Group: System Environment/Base URL: http://www.netfilter.org/ License: GPLv2 BuildRoot: /var/tmp/%{name}-%{version}-%{release} # el7 # libnetfilter_conntrack is needed for xt_connlabel #BuildRequires: libnetfilter_conntrack-devel >= 1.0.4 # libnfnetlink-devel is requires for nfnl_osf BuildRequires: libnfnetlink-devel BuildRequires: libselinux-devel BuildRequires: kernel-headers BuildRequires: scl-utils-build %description The iptables utility controls the network packet filtering code in the Linux kernel. If you need to set up firewalls and/or IP masquerading, you should install this package. %package devel Summary: Development package for iptables Group: System Environment/Base Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel iptables development headers and libraries. The iptc interface is upstream marked as not public. The interface is not stable and may change with every new version. It is therefore unsupported. #%if 0%{?scl:1} %package runtime Summary: Package that handles %scl Software Collection. Group: System Environment/Base Requires: scl-utils Provides: atomic-iptables-runtime ## %description runtime SCL Runtime #%endif %prep %setup -q -n iptables-%{version} %patch1 -p1 -b .rhbz_1054871 %patch2 -p1 -b .libxt_cgroup %patch3 -p1 -b .wait_seconds %patch4 -p1 -b .flock_wait %build CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing " \ %configure --enable-devel --with-kernel=/usr --with-kbuild=/usr --with-ksource=/usr # do not use rpath #sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool #sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool rm -f include/linux/types.h make %{?_smp_mflags} %install %scl_install cat < - 1.4.21-1 - Initial scl build