diff options
Diffstat (limited to 'system/trash-cli/trash-cli.SlackBuild')
-rw-r--r-- | system/trash-cli/trash-cli.SlackBuild | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/system/trash-cli/trash-cli.SlackBuild b/system/trash-cli/trash-cli.SlackBuild index a345343671..828d82c064 100644 --- a/system/trash-cli/trash-cli.SlackBuild +++ b/system/trash-cli/trash-cli.SlackBuild @@ -1,9 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for the trash-cli utils. # # Copyright 2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com> # Copyright 2017 Donald Cooley South Haven, IN USA +# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,10 +25,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=trash-cli -VERSION=${VERSION:-0.17.1.14} +VERSION=${VERSION:-0.24.4.17} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,25 +41,15 @@ if [ -z "$ARCH" ]; then esac fi -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} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -71,15 +65,14 @@ 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 {} \; -python setup.py install --root=$PKG +# Fix man path +sed 's|share/man/|man/|' -i setup.cfg + +python3 setup.py install --root=$PKG 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 -mkdir $PKG/usr/man -mv $PKG/usr/share/man/ $PKG/usr/ -rmdir $PKG/usr/share - 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 @@ -94,4 +87,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |