summaryrefslogtreecommitdiffstats
path: root/system/trash-cli
diff options
context:
space:
mode:
Diffstat (limited to 'system/trash-cli')
-rw-r--r--system/trash-cli/README3
-rw-r--r--system/trash-cli/slack-desc12
-rw-r--r--system/trash-cli/trash-cli.SlackBuild37
-rw-r--r--system/trash-cli/trash-cli.info10
4 files changed, 29 insertions, 33 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 bfe3db8a41..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.4.16}
+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
@@ -83,10 +66,21 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix man path
-sed 's|share/man/|man/|' -i setup.py
+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 ae8f51db83..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.4.16"
+VERSION="0.24.5.26"
HOMEPAGE="https://github.com/andreafrancia/trash-cli"
-DOWNLOAD="https://github.com/andreafrancia/trash-cli/archive/0.22.4.16/trash-cli-0.22.4.16.tar.gz"
-MD5SUM="4647bea15daf5aafb0ccafc67bdbfbb9"
+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"