diff options
Diffstat (limited to 'network/gtorrentviewer/gtorrentviewer.SlackBuild')
-rw-r--r-- | network/gtorrentviewer/gtorrentviewer.SlackBuild | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/network/gtorrentviewer/gtorrentviewer.SlackBuild b/network/gtorrentviewer/gtorrentviewer.SlackBuild index 4eb3257498..90b73f2eb6 100644 --- a/network/gtorrentviewer/gtorrentviewer.SlackBuild +++ b/network/gtorrentviewer/gtorrentviewer.SlackBuild @@ -2,8 +2,9 @@ # Slackware build script for gtorrentviewer +# Copyright 2023 B. Watson # Copyright 2018 Donald Cooley South Haven, Indiana USA -# Copyright 2010, 2012 Binh Nguyen <binhvng@gmail.com> +# Copyright 2010, 2012 Binh Nguyen # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,12 +24,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20231107 bkw: BUILD=5 +# - take over maintenance. +# - patch various segfault issues. +# - remove generic INSTALL from doc dir. +# - fix .desktop file. +# - new-style icon. +# - slight grammar fix in README and man page. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=gtorrentviewer SRCNAM=GTorrentViewer VERSION=${VERSION:-0.2b} -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,9 +49,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 @@ -75,27 +81,24 @@ rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$VERSION chown -R root:root . -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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20231107 bkw: most of these patches came from ALT Linux: +# https://git.altlinux.org/srpms/g/gtorrentviewer.git?a=tree;hb=0.2b-alt4_38 +# ...but a couple of them were "-p0" patches. I reworked them to apply +# with "patch -p1". The curl-types, desktop, and dso-linking patches aren't +# needed because their issues are fixed by code in this script. +# The manpage patch is a grammar fix, done by me. +for i in `cat $CWD/patches/series`; do + echo "=== applying $i" + patch -p1 < $CWD/patches/$i +done # Fix building against newer cURL -sed -i 's|#include <curl/types.h>||g' src/main.c - -# Fix linking of libm -patch -p1 < $CWD/patches/fix_linking_libm.diff - -# The following 2 patches are from Fedora 13 - -# Let drag and drop work with URIs as well as files -patch -p1 < $CWD/patches/gtorrentviewer-0.2b-desktop.patch - -# Fix crash due to use of uninitialized GValue -# Thanks to Niels Horn for pointing this out -patch -p1 < $CWD/patches/GTorrentViewer-0.2b-tracker-details-refresh.patch +sed -i '/#include <curl\/types.h>/d' src/main.c +LIBS="-lm" \ CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -106,19 +109,19 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* -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 +# 20231107 bkw: ship .desktop with corrections already applied. +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop -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/share/icons/hicolor/48x48 +ln -s ../../../pixmaps/$PRGNAM.png $PKG/usr/share/icons/hicolor/48x48/$PRGNAM.png -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog INSTALL README \ -$PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYING ChangeLog README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |