diff options
Diffstat (limited to 'desktop/Surfn/Surfn.SlackBuild')
-rw-r--r-- | desktop/Surfn/Surfn.SlackBuild | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/desktop/Surfn/Surfn.SlackBuild b/desktop/Surfn/Surfn.SlackBuild index 3f44005770..ce6598d413 100644 --- a/desktop/Surfn/Surfn.SlackBuild +++ b/desktop/Surfn/Surfn.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Surfn -# Copyright 2018-2019 Leonardo Citrolo, Italy +# Copyright 2018-2020 Leonardo Citrolo, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,14 +22,25 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220312 bkw: Modified by SlackBuilds.org: fix VERSION/SRCVER mess. +# VERSION must be a constant, and must match VERSION in the .info file. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=Surfn -VERSION=${VERSION:-9.7.1} +VERSION=${VERSION:-20.12_7} +SRCVER=${SRCVER:-$( echo $VERSION | tr _ -)} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -39,23 +50,27 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +# It's better not to be verbose, there's an awful lot of files to extract +echo "Extracting files..." +tar xf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER 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 {} \; mkdir -p $PKG/usr/share/icons cp -a surfn-icons/$PRGNAM* $PKG/usr/share/icons -find -L $PKG/usr/share/icons -type f -exec chmod 644 {} \; -find -L $PKG/usr/share/icons -type f -name '*.sh' -exec chmod 755 {} \; +find $PKG/usr/share/icons \ + \( -name CREDITS \ + -o -name LICENSE \ + -o -name create-new-icon-theme.cache.sh \ + -o -name icon-theme.cache \) -exec rm -f {} \; +rm -f $PKG/usr/share/icons/Surfn/changelog \ + $PKG/usr/share/icons/Surfn/LICENSE.txt +find $PKG/usr/share/icons -type d -exec chmod 755 {} \; +find $PKG/usr/share/icons -type f -exec chmod 644 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.md \ +cp -a surfn-icons/Surfn/{changelog,CREDITS,LICENSE.txt} README.md \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -63,4 +78,11 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +# 20200407 bkw: makepkg's symlink search and doinst.sh creation doesn't +# scale well. This makes the build complete much faster, and create an +# identical doinst.sh. +find . -type l \ + -printf '( cd %h ; rm -rf %f )\n( cd %h ; ln -sf %l %f )\n' -delete | \ + sed 's,cd \./,cd ,' >> $PKG/install/doinst.sh + +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |