aboutsummaryrefslogtreecommitdiff
path: root/network/SoulseekQt/SoulseekQt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/SoulseekQt/SoulseekQt.SlackBuild')
-rw-r--r--network/SoulseekQt/SoulseekQt.SlackBuild44
1 files changed, 27 insertions, 17 deletions
diff --git a/network/SoulseekQt/SoulseekQt.SlackBuild b/network/SoulseekQt/SoulseekQt.SlackBuild
index 313072d15a5b1..ffcf0113b188d 100644
--- a/network/SoulseekQt/SoulseekQt.SlackBuild
+++ b/network/SoulseekQt/SoulseekQt.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for SoulseekQt
-# Copyright 2016-2018, 2020 Dominik Drobek <dominik.drobek (at) o2.pl>
+# Copyright 2016-2018, 2020, 2022 Dominik Drobek <dominik.drobek (at) o2.pl>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,12 +25,12 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=SoulseekQt
-VERSION=${VERSION:-20160117}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-20180130}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-FVER="2016-1-17"
+FVER="2018-1-30"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -40,9 +40,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -54,8 +51,6 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "x86_64" ]; then
TGZARCH="64bit"
-elif [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
- TGZARCH="32bit"
else
printf "\n$ARCH is unsupported for $PRGNAM, exiting.\n\n"
exit 1
@@ -68,18 +63,33 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $TMP/$PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$FVER-$TGZARCH.tgz -C $TMP/$PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$FVER-$TGZARCH-appimage.tgz -C $TMP/$PRGNAM-$VERSION
cd $PRGNAM-$VERSION
+./$PRGNAM-$FVER-$TGZARCH.AppImage --appimage-extract
+cd squashfs-root/
chown -R root:root .
-
-install -D -m 755 $PRGNAM-$FVER-$TGZARCH $PKG/opt/$PRGNAM/$PRGNAM
-install -D -m 644 $CWD/$PRGNAM.png -t $PKG/usr/share/pixmaps/
-install -D -m 644 $CWD/$PRGNAM.desktop -t $PKG/usr/share/applications/
-mkdir -p $PKG/usr/bin
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p $PKG/{usr/bin,usr/share/applications,usr/share/pixmaps,opt}
+cp -r $TMP/$PRGNAM-$VERSION/squashfs-root/ $PKG/opt/$PRGNAM
+cp soulseek.png $PKG/usr/share/pixmaps/$PRGNAM.png
+cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
ln -sf ../../opt/$PRGNAM/$PRGNAM $PKG/usr/bin/$PRGNAM
-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
+# provide mock SELinux library
+gcc -s -shared -Wl,-soname,libselinux.so.1 \
+ $CWD/selinux-stub.c -o $PKG/opt/$PRGNAM/lib/libselinux.so.1
+
+# clean up unnecessary files
+rm $PKG/opt/$PRGNAM/{AppRun,.DirIcon,*.AppImage,default.desktop,soulseek.png}
+#rm $PKG/opt/$PRGNAM/lib/libfreetype.so.6 # Arch Linux PKGBUILD deletes this, not sure why
+
+# fix permissions on installed directories
+find $PKG/opt/$PRGNAM -type d -exec chmod 755 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild