2021-07-03 19:48:15 +02:00
|
|
|
#!/bin/bash
|
2010-08-14 21:43:58 +02:00
|
|
|
|
2022-04-26 00:50:55 +02:00
|
|
|
# Copyright 2022 B. Watson <urchlay@slackware.uk>
|
2019-05-11 02:10:37 +02:00
|
|
|
# Copyright 2017-2019 Donald Cooley South Haven, IN USA
|
2023-05-06 23:53:01 +02:00
|
|
|
# Copyright 2010 Binh Nguyen <email removed>
|
2022-04-26 00:50:55 +02:00
|
|
|
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2023-05-06 23:53:01 +02:00
|
|
|
# 20230506 bkw: update for v20230429.
|
2023-01-03 19:55:54 +01:00
|
|
|
# 20230103 bkw: update for v20220807.
|
2022-04-26 00:50:55 +02:00
|
|
|
# 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).
|
2010-08-14 21:43:58 +02:00
|
|
|
|
2021-07-04 11:41:06 +02:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2010-08-14 21:43:58 +02:00
|
|
|
PRGNAM=gprename
|
2023-05-06 23:53:01 +02:00
|
|
|
VERSION=${VERSION:-20230429}
|
2010-08-14 21:43:58 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 12:23:38 +02:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2010-08-14 21:43:58 +02:00
|
|
|
|
|
|
|
ARCH=noarch
|
|
|
|
|
2021-07-04 12:23:38 +02:00
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2010-08-14 21:43:58 +02:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2022-04-26 00:50:55 +02:00
|
|
|
set -e
|
2010-08-14 21:43:58 +02:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2022-04-26 00:50:55 +02:00
|
|
|
rm -rf $PRGNAM-$VERSION
|
2023-05-06 23:53:01 +02:00
|
|
|
unzip $CWD/$PRGNAM-$VERSION.zip
|
2013-12-01 15:21:02 +01:00
|
|
|
cd $PRGNAM-$VERSION
|
2010-08-14 21:43:58 +02:00
|
|
|
chown -R root:root .
|
2022-04-26 00:50:55 +02:00
|
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
|
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
2010-08-14 21:43:58 +02:00
|
|
|
|
2022-04-26 00:50:55 +02:00
|
|
|
# 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.
|
2017-08-29 17:38:44 +02:00
|
|
|
patch -p1 < $CWD/gprename-makefile-fixups.patch
|
|
|
|
|
2022-04-26 00:50:55 +02:00
|
|
|
# 20220425 bkw: note nonstandard use of DESTDIR!
|
2015-08-04 02:48:03 +02:00
|
|
|
make -j1 install DESTDIR=$PKG/usr PREFIX=/usr
|
2022-04-26 00:50:55 +02:00
|
|
|
gzip -9 $PKG/usr/man/man*/*
|
2010-08-14 21:43:58 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2022-04-26 00:50:55 +02:00
|
|
|
install -m0644 COPYING.TXT README.TXT $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-08-14 21:43:58 +02:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 12:23:38 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|