aboutsummaryrefslogtreecommitdiff
path: root/misc/gprename/gprename.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-25 18:50:55 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-29 10:30:54 -0400
commitd8189217b29cd9a2be2d0ee9d63b3be66f8c541d (patch)
tree582c749fd6ed7b1c757a84deab26b82486a3c304 /misc/gprename/gprename.SlackBuild
parente83c4eb40798e6efed57a1d62538fe8365d7b513 (diff)
misc/gprename: Updated for version 20220206, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'misc/gprename/gprename.SlackBuild')
-rw-r--r--misc/gprename/gprename.SlackBuild63
1 files changed, 24 insertions, 39 deletions
diff --git a/misc/gprename/gprename.SlackBuild b/misc/gprename/gprename.SlackBuild
index 0cfe15ce9ccb2..76975fb82deaf 100644
--- a/misc/gprename/gprename.SlackBuild
+++ b/misc/gprename/gprename.SlackBuild
@@ -1,39 +1,30 @@
#!/bin/bash
-# Copyright 2010 Binh Nguyen <binhvng@gmail.com>
+# Copyright 2022 B. Watson <urchlay@slackware.uk>
# Copyright 2017-2019 Donald Cooley South Haven, IN USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Copyright 2010 Binh Nguyen <binhvng@gmail.com>
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220425 bkw:
+# - new maintainer.
+# - update for v20220206.
+# - relicense as WTFPL (permission per mailing list).
+# - put icon in /usr/share/pixmaps.
+# - rework patch for new version.
+# - REQUIRES perl-Gtk3 (not perl-gtk2).
+# - update README and slack-desc (to mention GTK3).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gprename
-VERSION=${VERSION:-20190221}
+VERSION=${VERSION:-20220206}
BUILD=${BUILD:-1}
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
@@ -43,35 +34,29 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-set -eu
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# Don't run update-desktop-database or install icons on the build host
+# Don't run update-desktop-database or install icons on the build host.
+# 20220425 bkw: patch also changes icon path to /usr/share/pixmaps
+# and sets the man dir to /usr/man.
patch -p1 < $CWD/gprename-makefile-fixups.patch
+# 20220425 bkw: note nonstandard use of DESTDIR!
make -j1 install DESTDIR=$PKG/usr PREFIX=/usr
-
-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
-
-mv $PKG/usr/share/man $PKG/usr
-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
+gzip -9 $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING.TXT README.TXT $PKG/usr/doc/$PRGNAM-$VERSION
+install -m0644 COPYING.TXT README.TXT $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install