Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37043058
en ru br
ALT Linux repos
S:1.8.7-alt1
5.0: 1.4.0-alt4
4.1: 1.4.0-alt0.M41.1
4.0: 1.3.7-alt1
3.0: 1.3.1-alt2

Group :: System/Kernel and hardware
RPM: iptables

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: iptables
Version: 1.4.0
Release: alt4

Summary: Tools for managing Linux kernel packet filtering capabilities
License: GPLv2+
Group: System/Kernel and hardware
Url: http://www.netfilter.org/projects/iptables/
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source: ftp://ftp.netfilter.org/pub/iptables/%name-%version.tar
Source1: iptables.init
Source2: iptables_data
Source3: iptables_params
Source4: iptables_modules

Patch1: iptables-1.4.0-alt-iptc-defs.patch
Patch2: iptables-1.4.0-alt-modprobe.patch
Patch3: iptables-1.4.0-alt-parse_port.patch
Patch4: iptables-1.4.0-alt-shared.patch
Patch5: iptables-1.4.0-alt-eperm.patch
Patch6: iptables-1.4.0-alt-dump_entry.patch
Patch7: iptables-1.4.0-alt-compile.patch
Patch8: iptables-1.4.0-alt-warnings.patch
Patch9: iptables-1.4.0-up-ipset.patch
Patch10: iptables-1.4.0-alt-ipset-man.patch
Patch11: iptables-1.4.0-up-int6_addr.patch

%description
Iptables is used to set up, maintain, and inspect the tables of IP
packet filter rules in the Linux kernel.  Several different tables may
be defined.  Each table contains a number of built-in chains and may
also contain user-defined chains.

Each chain is a list of rules which can match a set of packets.  Each rule
specifies what to do with a packet that matches.  This is called a
`target', which may be a jump to a user-defined chain in the same table.

%package ipv6
Summary: IPv6 support for iptables
Group: System/Kernel and hardware
Requires: %name = %version-%release

%description ipv6
Ip6tables is used to set up, maintain, and inspect the tables of IPv6
packet filter rules in the Linux kernel.  Several different tables may
be defined.  Each table contains a number of built-in chains and may
also contain user-defined chains.

Each chain is a list of rules which can match a set of packets.  Each rule
specifies what to do with a packet that matches.  This is called a
`target', which may be a jump to a user-defined chain in the same table.

%package devel
Summary: iptables development files
Group: Development/C
Requires: %name = %version-%release
Requires: %name-ipv6 = %version-%release

%description devel
Iptables is used to set up, maintain, and inspect the tables of IP packet
filter rules in the Linux kernel.

This package contains development files required to build software that
operates with netfilter.

%package devel-static
Summary: iptables static development files
Group: Development/C
Requires: %name-devel = %version-%release

%description devel-static
Iptables is used to set up, maintain, and inspect the tables of IP packet
filter rules in the Linux kernel.

This package contains static library required to build software that
operates with netfilter.

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
find -type f -print0 |
xargs -r0 grep -FZl /usr/local/lib/ -- |
xargs -r0 %__subst 's|/usr/local/lib/|/%_lib/|' --

%build
%__make \
PREFIX=%prefix \
BINDIR=/sbin \
LIBDIR=/%_lib \
KERNEL_DIR=%_prefix \
KBUILD_OUTPUT=%_prefix \
CC=%__cc \
COPT_FLAGS='%optflags' \
LDLIBS='-ldl' \
LDFLAGS='-Wl,--as-needed' \
EXT_LDFLAGS='-Wl,--as-needed' \
#

%install
make install install-experimental install-devel \
DESTDIR=%buildroot \
PREFIX=%prefix \
BINDIR=/sbin \
LIBDIR=/%_lib \
MANDIR=%_mandir \
#
mkdir -p %buildroot%_libdir
pushd %buildroot/%_lib
for f in lib*; do
ln -s ../../%_lib/$f %buildroot%_libdir/${f%%.0.0}
done
popd
mv %buildroot/%_lib/*.a %buildroot%_libdir/

mkdir -p %buildroot%_includedir/libiptc
install -pm644 include/*.h %buildroot%_includedir/
install -pm644 include/libiptc/*.h %buildroot%_includedir/libiptc/

install -pDm755 %_sourcedir/iptables.init %buildroot%_initdir/iptables
cp -p %buildroot%_initdir/ip{,6}tables
%__subst -p s/iptables/ip6tables/g %buildroot%_initdir/ip6tables

install -pDm600 %_sourcedir/iptables_params %buildroot%_sysconfdir/sysconfig/iptables_params
cp -p %buildroot%_sysconfdir/sysconfig/ip{,6}tables_params
%__subst -p s/iptables/ip6tables/g %buildroot%_sysconfdir/sysconfig/ip6tables_params

install -pDm600 %_sourcedir/iptables_data %buildroot%_sysconfdir/sysconfig/iptables
cp -p %buildroot%_sysconfdir/sysconfig/ip{,6}tables
%__subst -p s/iptables/ip6tables/g %buildroot%_sysconfdir/sysconfig/ip6tables

install -pDm600 %_sourcedir/iptables_modules %buildroot%_sysconfdir/sysconfig/iptables_modules
cp -p %buildroot%_sysconfdir/sysconfig/ip{,6}tables_modules
%__subst -p s/iptables/ip6tables/g %buildroot%_sysconfdir/sysconfig/ip6tables_modules

%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add iptables
fi

%preun
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del iptables
fi

%post ipv6
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add ip6tables
fi

%preun ipv6
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del ip6tables
fi

%files
%config(noreplace) %_sysconfdir/sysconfig/iptables*
%doc INCOMPATIBILITIES
%config %_initdir/iptables
/sbin/iptables*
%_man8dir/iptables*
%dir /%_lib/iptables
/%_lib/iptables/libipt*
/%_lib/iptables/libxt*
/%_lib/libipt*.so.*
/%_lib/libipq*.so.*

%files ipv6
%config(noreplace) %_sysconfdir/sysconfig/ip6tables*
%config %_initdir/ip6tables
/sbin/ip6tables*
%_man8dir/ip6tables*
%dir /%_lib/iptables
/%_lib/iptables/libip6t*
/%_lib/libip6t*.so.*

%files devel
%_includedir/*
%_libdir/lib*.so
%_man3dir/*

%files devel-static
%_libdir/lib*.a

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin