summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-16 11:58:19 -0400
committerB. Watson <yalhcru@gmail.com>2022-03-17 13:23:07 -0400
commit9ffbc67bd83770e6f253c4210f214e5510c4a758 (patch)
treedf80cbbeaa9771f557403d046f6df83218ac01c9 /system
parentccd98f72f6edbe544b1ac5bcae36dfc2fdaf2cf3 (diff)
downloadslackbuilds-9ffbc67bd83770e6f253c4210f214e5510c4a758.tar.gz
system/trashy: Clean up build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system')
-rw-r--r--system/trashy/README7
-rw-r--r--system/trashy/doinst.sh1
-rw-r--r--system/trashy/slack-desc2
-rw-r--r--system/trashy/trashy.8108
-rw-r--r--system/trashy/trashy.SlackBuild65
5 files changed, 36 insertions, 147 deletions
diff --git a/system/trashy/README b/system/trashy/README
index ef5611eca3..f0daa0d9c4 100644
--- a/system/trashy/README
+++ b/system/trashy/README
@@ -4,7 +4,7 @@ written entirely in BASH.
http://slackermedia.info/trashy
Usage
--------
+-----
Trashy is a simple shell script that introduces the idea of a trash
can for the command line. Meaning that you can issue this command:
@@ -27,12 +27,11 @@ issue the command:
and your system trash will be emptied.
-
System Trash
----------------
+------------
Trashy defines a "system trash" on Linux, BSD, and Solaris-based
-operating systems in accordance to the Open Desktop standard:
+operating systems in accordance with the Open Desktop standard:
~/.local/share/Trash
On systems that do not use a desktop, trashy simply creates a ~/.trash
diff --git a/system/trashy/doinst.sh b/system/trashy/doinst.sh
deleted file mode 100644
index aaa8e9a655..0000000000
--- a/system/trashy/doinst.sh
+++ /dev/null
@@ -1 +0,0 @@
-ln -s /usr/bin/trashy /usr/bin/trash
diff --git a/system/trashy/slack-desc b/system/trashy/slack-desc
index 7df2abbc63..e7ef88b95e 100644
--- a/system/trashy/slack-desc
+++ b/system/trashy/slack-desc
@@ -13,7 +13,7 @@ trashy: to encourage people to avoid using 'rm' so often. Move files to your
trashy: trash, list files in your trash, restore files from trash, and empty
trashy: the trash from your shell.
trashy:
-trashy: https://gitlab.freedesktop.org/notklaatu/trashy/
+trashy:
trashy:
trashy:
trashy:
diff --git a/system/trashy/trashy.8 b/system/trashy/trashy.8
deleted file mode 100644
index 76bc857651..0000000000
--- a/system/trashy/trashy.8
+++ /dev/null
@@ -1,108 +0,0 @@
-.\" trashy - an rm intermediary
-.TH "trashy" "8" "" "Klaatu" ""
-.SH "NAME"
-trashy \- trash in the shell
-.SH "SYNOPSIS"
-\fBtrash\fP file1 file2...
-.nf
-\fBempty\fP [option]
-.SH "DESCRIPTION"
-.PP
-There is an unhealthy habit that arises with many a POSIX user: the
-careless and wreckless use of the dreaded \fBrm\fP command. \fBTrashy\fP
-is a helpful intermediary that intervenes when you would otherwise use
-\fBrm\fP.
-.PP
-\fBtrashy\fP attempts to be compliant with the Free Desktop specification for
-desktop trash, meaning that you can use \fBtrashy\fP in conjunction
-with a desktop environment and find your files in your desktop trash
-just as if you had dragged and dropped them there yourself. You can
-also restore the files by right-clicking and selecting `restore`, or
-whatever method your desktop defines for that process.
-.PP
-.SH "USAGE"
-.TP
-Issue this command:
-.PP
-\fBtrash\fP foo
-.PP
-and foo will be moved to the system trash.
-.PP
-At this point, you have not yet removed the file from your system, so
-if you wish to recover it, go and fetch it from your trash. There, now
-isn't that nicer than \fBrm\fP?
-.PP
-When you're really really sure that everything in
-your Trash wants to be nuked out of existance, then you can
-issue the command:
-.PP
-trask --empty
-.PP
-and your Trash will be emptied.
-.PP
-If there are spaces in your filenames, first of all stop using spaces
-in your filenames. Secondly, you must escape the space when you trash
-it:
-.PP
-\fBtrash\fP foo\\ bar
-.PP
-If you issue \fBtrash\fP without any arguments, it tells you the
-current size of your system trash.
-.SH OPTIONS
-.PP
-.TP
-.B -l, --list
-Lists the contents of your trash can.
-.TP
-.B -v, --verbose
-Makes \fBtrashy\fP verbose.
-.TP
-.B -w, --version, --which
-Returns the version of trashy you are currently running. -w because -v
-was already taken by verbose :-)
-.TP
-.B -d, --dry-run, --dryrun
-Does not actually move or remove files, just shows what will happen if
-you really did. The --empty process is verbose by default.
-.PP
-.SH "SYSTEM TRASH LOCATIONS"
-.PP
-On Linux, BSD, Ilumos, and Solaris, the system trash, by default, is
-that defined by the Free Desktop specification: ~/.local/share/Trash
-.PP
-If you do not use an environment that plays nice with the Free Desktop
-spec (ie, Mac OS) then trashy will attempt to detect and use
-your actual system trash.
-.PP
-If all else fails, a ~/.trash directory is created and used.
-.PP
-.SH "BUGS AND ISSUES"
-.PP
-Things can get a little messy when you're trashing files from an
-external drive because \fBtrash\fP currently moves the file from your external
-drive to your system harddrive. It works, but it's not as graceful as,
-say, creating a .trash folder on that external drive and hiding stuff
-there until later.
-.PP
-.SH "ALTERNATIVES"
-.PP
-\fBTrashy\fP depends on BASH. There is a similar application called
-trash-cli, which is Python-based. At this point, they do mostly the
-same thing, but obviously if you do not run BASH or ZSH or similar,
-then you might prefer a Python-based solution.
-.SH "SEE ALSO"
-.nf
-.I rm (1)
-.I mv (1)
-.URL http://slackermedia.info/trashy
-.URL https://github.com/andreafrancia/trash-cli
-.fi
-.PP
-.SH "AUTHORS"
-.nf
-Klaatu (klaatu@member.fsf.org)
-.fi
-.PP
-.SH "BUGS"
-Email bugs reports or fixes to klaatu@member.fsf.org
-.fi
diff --git a/system/trashy/trashy.SlackBuild b/system/trashy/trashy.SlackBuild
index a5221a6768..5071ab9623 100644
--- a/system/trashy/trashy.SlackBuild
+++ b/system/trashy/trashy.SlackBuild
@@ -9,19 +9,27 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
+# 20220316 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - move symlink creation to the script, because doinst.sh was
+# creating a symlink that didn't get removed by removepkg.
+# - get rid of the utterly useless and time-consuming autoconf,
+# aclocal, configure stuff. this is a shell script and a man
+# page, configure wasn't *doing* anything.
+# - do not install useless INSTALL in doc dir.
+# - do install LICENSE and AUTHORS in doc dir.
+# - use the man page from the source, which seems to document what
+# trashy does more accurately than the one that was here.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=trashy
VERSION=${VERSION:-2.5.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-# 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
@@ -37,41 +45,32 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION-$COMMITVER
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$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 {} \;
-
-aclocal
-automake --add-missing
-autoconf
-./configure \
- --prefix=/usr \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION
-
-make
-make install DESTDIR=$PKG
-
-#man
-mkdir -p $PKG/usr/man/man8/
-cp $CWD/$PRGNAM.8 $PKG/usr/man/man8/$PRGNAM.8
-gzip $PKG/usr/man/man8/$PRGNAM.8
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- README.md COPYING INSTALL \
-$PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# 20220316 bkw: skip the autoreconf/configure/make stuff, it's
+# 2 files, we can get by without 'make install'.
+mkdir -p $PKG/usr/{bin,man/man8}
+install -m0755 -oroot -groot bin/$PRGNAM $PKG/usr/bin/$PRGNAM
+gzip -9c < man/$PRGNAM.8 > $PKG/usr/man/man8/$PRGNAM.8.gz
+
+# 20220316 bkw: no idea why the thing is called "trashy" but
+# its man page and --help refer to it as "trash". symlinks
+# to the rescue.
+ln -s $PRGNAM $PKG/usr/bin/trash
+ln -s $PRGNAM.8.gz $PKG/usr/man/man8/trash.8.gz
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README.md LICENSE AUTHORS $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE