diff options
Diffstat (limited to 'system/trash-cli')
-rw-r--r-- | system/trash-cli/README | 3 | ||||
-rw-r--r-- | system/trash-cli/slack-desc | 12 | ||||
-rw-r--r-- | system/trash-cli/trash-cli.SlackBuild | 35 | ||||
-rw-r--r-- | system/trash-cli/trash-cli.info | 10 |
4 files changed, 28 insertions, 32 deletions
diff --git a/system/trash-cli/README b/system/trash-cli/README index 3d1f4c8749..94d4c378b7 100644 --- a/system/trash-cli/README +++ b/system/trash-cli/README @@ -9,3 +9,6 @@ trash-empty : empty the trashcan(s). trash-list : list trashed files. trash-restore : restore a trashed file. trash-rm : remove individual files from trash can. + +python3-shtab is additionally required for installing trash-cli with +shell completion support. diff --git a/system/trash-cli/slack-desc b/system/trash-cli/slack-desc index 850ad04dee..1e01ec84e9 100644 --- a/system/trash-cli/slack-desc +++ b/system/trash-cli/slack-desc @@ -11,9 +11,9 @@ trash-cli: trash-cli: trash-cli trashes files recording the original path, deletion date, trash-cli: and permissions. It uses the same trashcan used by KDE, GNOME, and trash-cli: XFCE, but you can invoke it from the command line (and scripts). -trash-cli: It provides these commands: -trash-cli: trash-put : trashes files and directories. -trash-cli: trash-empty : empty the trashcan(s). -trash-cli: trash-list : list trashed files. -trash-cli: trash-restore : restore a trashed file. -trash-cli: trash-rm : remove individual files from trash can. +trash-cli: +trash-cli: +trash-cli: +trash-cli: +trash-cli: +trash-cli: diff --git a/system/trash-cli/trash-cli.SlackBuild b/system/trash-cli/trash-cli.SlackBuild index f2cf015e11..3f483b4c46 100644 --- a/system/trash-cli/trash-cli.SlackBuild +++ b/system/trash-cli/trash-cli.SlackBuild @@ -4,7 +4,7 @@ # # Copyright 2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com> # Copyright 2017 Donald Cooley South Haven, IN USA -# Copyright 2022 Isaac Yu <isaacyu1@isaacyu1.com> +# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=trash-cli -VERSION=${VERSION:-0.22.10.20} +VERSION=${VERSION:-0.24.5.26} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -41,9 +41,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 @@ -53,20 +50,6 @@ 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 @@ -87,6 +70,17 @@ sed 's|share/man/|man/|' -i setup.cfg python3 setup.py install --root=$PKG +# Add trash-cli shell completions (requires python3-shtab) +# Reference: https://github.com/zsh-users/zsh-completions/pull/895 +if $(python3 -c 'import pkgutil; exit(not pkgutil.find_loader("shtab"))'); then + mkdir -p $PKG/usr/share/bash-completion/completions + mkdir -p $PKG/usr/share/zsh/site-functions + for CMD in trash-empty trash-list trash-restore trash-put trash; do + $CMD --print-completion bash > "$PKG/usr/share/bash-completion/completions/$CMD" + $CMD --print-completion zsh > "$PKG/usr/share/zsh/site-functions/_$CMD" + done +fi + 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 @@ -95,8 +89,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - COPYING CREDITS.txt DONE.txt HISTORY.txt README.rst TODO.txt \ - bugs.txt requirements-dev.txt docs \ + COPYING CREDITS.txt HISTORY.txt README.rst requirements-dev.txt docs \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/trash-cli/trash-cli.info b/system/trash-cli/trash-cli.info index 404efbf46a..9ab849adc1 100644 --- a/system/trash-cli/trash-cli.info +++ b/system/trash-cli/trash-cli.info @@ -1,10 +1,10 @@ PRGNAM="trash-cli" -VERSION="0.22.10.20" +VERSION="0.24.5.26" HOMEPAGE="https://github.com/andreafrancia/trash-cli" -DOWNLOAD="https://github.com/andreafrancia/trash-cli/archive/0.22.10.20/trash-cli-0.22.10.20.tar.gz" -MD5SUM="54e8c14f763f69673fa5143b3159f21d" +DOWNLOAD="https://github.com/andreafrancia/trash-cli/archive/0.24.5.26/trash-cli-0.24.5.26.tar.gz" +MD5SUM="e3d0c09b2c411313ec64aa8cb00c4758" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="python3-psutil" MAINTAINER="Isaac Yu" -EMAIL="isaacyu1@isaacyu1.com" +EMAIL="isaacyu@protonmail.com" |