Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37520490
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.3.1
Release: alt2

Summary: Tools for managing Linux kernel packet filtering capabilities
License: GPL
Group: System/Kernel and hardware
Url: http://www.iptables.org/
Packager: Alexey Voinov <voins at altlinux.ru>

Source: %url/files/%name-%version.tar.bz2
Source1: iptables.init
Source2: ip6tables.init
Source3: iptables.config
Source4: ip6tables.config
Source5: iptables_modules
Source6: ip6tables_modules
Patch1: %name-1.2.2-iptables-restore-crash-fix.patch
Patch3: %name-1.2.8-alt-logging.patch
Patch4: %name-1.3.1-alt-makefile.patch
Patch5: %name-1.2.9-alt-servname.patch
Patch6: %name-1.2.11-alt-ccld.patch
#Patch7: %name-1.2.11-alt-freebug.patch
Patch8: %name-1.3.1-alt-modprobe.patch
Patch9: %name-1.2.11-alt-zerocounters.patch
Patch10: %name-1.3.1-alt-iptcdefs.patch

BuildPreReq: kernel-headers-std

%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  ta-
ble.

%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
#%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
#%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
pushd extensions
subst 's/_\(init *( *void *)\)/__attribute__((constructor)) constructor_\1/' *.c
popd

%build
make COPT_FLAGS="%optflags" PREFIX=%prefix LIBDIR=/%_lib \
all experimental

%install
make install install-experimental install-devel \
DESTDIR=%buildroot BINDIR=/sbin MANDIR=%_mandir \
PREFIX=%prefix LIBDIR=/%_lib
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 -Dpm755 %SOURCE1 %buildroot%_initdir/iptables
install -Dpm755 %SOURCE2 %buildroot%_initdir/ip6tables
install -Dpm640 %SOURCE3 %buildroot%_sysconfdir/sysconfig/iptables
install -Dpm640 %SOURCE4 %buildroot%_sysconfdir/sysconfig/ip6tables
install -Dpm640 %SOURCE5 %buildroot%_sysconfdir/sysconfig/iptables_modules
install -Dpm640 %SOURCE6 %buildroot%_sysconfdir/sysconfig/ip6tables_modules

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

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

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

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

%post -p %post_ldconfig
%postun -p %postun_ldconfig

%post ipv6 -p %post_ldconfig
%postun ipv6 -p %postun_ldconfig

%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