IGNOREPATH=/etc:/home:/var:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/mnt:/usr/src
STRIPLIB=y
STRIPBIN=y

VERSION=1.2.10
PROGNAME="iptables $VERSION"
DESC="\
iptables (IP packet filter administration)                             \n\
                                                                       \n\
iptables is a packet filter administration tool for Linux 2.4,         \n\
replacing the ipchains tool that was used with the 2.2 kernel.  The    \n\
iptables  tool is used to set up, maintain, and inspect the tables of  \n\
IP packet filter rules in the Linux kernel for packet filtering,       \n\
firewalling, and NAT (Network Address Translation).                    \n\
                                                                       \n\
If you plan to set up a firewall with Linux 2.4, you'll need this."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=http://netfilter.samba.org
PKGNAME=iptables-$VERSION-s390-$BUILD
TAG=ADD

compile() {
   tar -yxvf $CWD/iptables-$VERSION.tar.bz2
   cd iptables-$VERSION/
   chown -R root.root .
   zcat $CWD/iptables.prefix.diff.gz | patch -p1
   make
}

install() {
   make install DESTDIR=/package-iptables
   make install-devel DESTDIR=/package-iptables
   make experimental DESTDIR=/package-iptables
   make install-experimental DESTDIR=/package-iptables

   mkdir -p /package-iptables/usr/doc/iptables-$VERSION
   cp -a COPYING INSTALL /package-iptables/usr/doc/iptables-$VERSION

   ( cd /package-iptables/usr/man
     for dir in 3 8; do
       ( cd man$dir
         rm -f *.gz
         gzip -9 *.$dir
       )
     done
   )
}

attributes() {
   chown -R root.bin $PKG/package-iptables/usr/sbin
}

special() {
   cd $PKG
   mv package-iptables/* ./
   rmdir package-iptables/

   cd $CTL
   cat $CWD/slack-desc > slack-desc

   sed -e 's%package-iptables/%%g' doinst.sh > doinst.sh.new
   cat doinst.sh.new > doinst.sh
   rm doinst.sh.new
}

