diff options
author | B. Watson <yalhcru@gmail.com> | 2022-03-16 11:58:19 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-03-17 13:23:07 -0400 |
commit | 9ffbc67bd83770e6f253c4210f214e5510c4a758 (patch) | |
tree | df80cbbeaa9771f557403d046f6df83218ac01c9 /system/trashy/trashy.SlackBuild | |
parent | ccd98f72f6edbe544b1ac5bcae36dfc2fdaf2cf3 (diff) |
system/trashy: Clean up build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/trashy/trashy.SlackBuild')
-rw-r--r-- | system/trashy/trashy.SlackBuild | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/system/trashy/trashy.SlackBuild b/system/trashy/trashy.SlackBuild index a5221a676843e..5071ab9623b74 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 |