summaryrefslogtreecommitdiffstats
path: root/network/gui-ufw/gui-ufw.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/gui-ufw/gui-ufw.SlackBuild')
-rw-r--r--network/gui-ufw/gui-ufw.SlackBuild34
1 files changed, 18 insertions, 16 deletions
diff --git a/network/gui-ufw/gui-ufw.SlackBuild b/network/gui-ufw/gui-ufw.SlackBuild
index 73b25c41fe..8b80695069 100644
--- a/network/gui-ufw/gui-ufw.SlackBuild
+++ b/network/gui-ufw/gui-ufw.SlackBuild
@@ -1,8 +1,7 @@
#!/bin/sh
# Slackware build script for gui-ufw
-#
-# Copyright 2016 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
+# Copyright 2018 Skaendo <skaendo at excite dot com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +22,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gui-ufw
-VERSION=${VERSION:-12.04.1}
+VERSION=${VERSION:-18.04.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +39,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -60,7 +59,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/"$PRGNAM"_"$VERSION".orig.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -69,28 +68,31 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fixes paths in bin script
-patch -p1 < $CWD/binfix.diff
+# Point gufw-pkexec to the correct python3 location and version.
+sed -i "s|lib/python3.5|lib$LIBDIRSUFFIX/python3.6|g" bin/gufw-pkexec
+
+python3 setup.py install --root=$PKG
-python setup.py install --root=$PKG
+# Move the manpage to a sane directory.
+mv $PKG/usr/share/man $PKG/usr
-# Fix paths and cleanup
-mv $PKG/usr/share/man $PKG/usr/man
-install -D -m 0644 $PKG/usr/share/icons/hicolor/48x48/apps/gufw.png $PKG/usr/share/pixmaps/gufw.png
+# This dir only contains a README for gufw. The same exact README can be found in
+# /usr/doc/gui-ufw-$VERSION, so lets just ditch this one.
rm -rf $PKG/usr/share/doc
-# Desktop file modded to be like newer releases of gufw
-install -D -m 0644 $CWD/gufw.desktop $PKG/usr/share/applications/gufw.desktop
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING.GPL3 INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING.GPL3 INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}