summaryrefslogtreecommitdiffstats
path: root/source/n/iptables/iptables.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/iptables/iptables.SlackBuild')
-rwxr-xr-xsource/n/iptables/iptables.SlackBuild24
1 files changed, 22 insertions, 2 deletions
diff --git a/source/n/iptables/iptables.SlackBuild b/source/n/iptables/iptables.SlackBuild
index 0d191b3c7..26f3d922e 100755
--- a/source/n/iptables/iptables.SlackBuild
+++ b/source/n/iptables/iptables.SlackBuild
@@ -83,14 +83,34 @@ make install DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
mkdir -p $PKG/usr/doc/iptables-$VERSION
cp -a \
COPYING* INCOMPATIBILITIES INSTALL \
$PKG/usr/doc/iptables-$VERSION
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc