misc/gprename: Updated for version 20220206, new maintainer.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-04-25 18:50:55 -04:00
parent e83c4eb407
commit d8189217b2
5 changed files with 98 additions and 62 deletions

View File

@ -1,2 +1,4 @@
gprename (a GTK3 batch renamer for files and directories)
GPRename is a complete batch renamer for files and directories and is GPRename is a complete batch renamer for files and directories and is
licensed under the terms of the GNU General Public Licence version 3. licensed under the terms of the GNU General Public Licence version 3.

View File

@ -1,27 +1,43 @@
diff -u -r gprename-20160905/Makefile gprename-20160905-patched/Makefile diff -Naur gprename-20220206/Makefile gprename-20220206.patched/Makefile
--- gprename-20160905/Makefile 2016-09-05 21:13:20.000000000 +0100 --- gprename-20220206/Makefile 2022-02-06 21:15:52.000000000 -0500
+++ gprename-20160905-patched/Makefile 2017-08-29 16:24:44.033333612 +0100 +++ gprename-20220206.patched/Makefile 2022-04-25 18:44:43.817838632 -0400
@@ -45,8 +45,8 @@ @@ -27,7 +27,7 @@
perl -ne 's!\@INSTALLDIR\@!$(PREFIX)!g ; print' < bin/gprename > build/gprename
perl -ne 's!\@INSTALLDIR\@!$(PREFIX)!g ; print' < bin/gprename.desktop > build/gprename.desktop
-install: uninstall build
+install: build
# Compile all .po files to .mo
msgfmt -o build/locale/ca.mo locale/ca.po
msgfmt -o build/locale/de.mo locale/de.po
@@ -47,11 +47,11 @@
# Create directories # Create directories
install -d "$(DESTDIR)" install -d "$(DESTDIR)"
install -d "$(DESTDIR)/bin" install -d "$(DESTDIR)/bin"
- install -d "/usr/share" - install -d "/usr/share"
- install -d "/usr/share/icons" - install -d "/usr/share/icons"
+ install -d "$(DESTDIR)/share" + install -d "$(DESTDIR)/share"
+ install -d "$(DESTDIR)/share/icons" + install -d "$(DESTDIR)/share/pixmaps"
install -d "$(DESTDIR)/share/applications" install -d "$(DESTDIR)/share/applications"
install -d "$(DESTDIR)/share/man" - install -d "$(DESTDIR)/share/man"
install -d "$(DESTDIR)/share/man/man1" - install -d "$(DESTDIR)/share/man/man1"
@@ -67,7 +67,7 @@ + install -d "$(DESTDIR)/man"
+ install -d "$(DESTDIR)/man/man1"
install -d "$(DESTDIR)/share/locale/ca/LC_MESSAGES"
install -d "$(DESTDIR)/share/locale/de/LC_MESSAGES"
install -d "$(DESTDIR)/share/locale/es/LC_MESSAGES"
@@ -69,8 +69,8 @@
# Copy all files in the filesystem # Copy all files in the filesystem
install -m 755 build/gprename "$(DESTDIR)/bin/" install -m 755 build/gprename "$(DESTDIR)/bin/"
install -m 644 gprename-nautilus-actions.xml "$(DESTDIR)/share/applications/"
- install -m 644 icon/gprename.png "/usr/share/icons/" - install -m 644 icon/gprename.png "/usr/share/icons/"
+ install -m 644 icon/gprename.png "$(DESTDIR)/share/icons/" - install -m 644 man/gprename.1 "$(DESTDIR)/share/man/man1/"
install -m 644 man/gprename.1 "$(DESTDIR)/share/man/man1/" + install -m 644 icon/gprename.png "$(DESTDIR)/share/pixmaps/"
+ install -m 644 man/gprename.1 "$(DESTDIR)/man/man1/"
install -m 644 build/locale/ca.mo "$(DESTDIR)/share/locale/ca/LC_MESSAGES/gprename.mo" install -m 644 build/locale/ca.mo "$(DESTDIR)/share/locale/ca/LC_MESSAGES/gprename.mo"
install -m 644 build/locale/de.mo "$(DESTDIR)/share/locale/de/LC_MESSAGES/gprename.mo" install -m 644 build/locale/de.mo "$(DESTDIR)/share/locale/de/LC_MESSAGES/gprename.mo"
@@ -82,13 +82,12 @@ install -m 644 build/locale/es.mo "$(DESTDIR)/share/locale/es/LC_MESSAGES/gprename.mo"
@@ -85,13 +85,12 @@
install -m 644 build/locale/ru.mo "$(DESTDIR)/share/locale/ru/LC_MESSAGES/gprename.mo" install -m 644 build/locale/ru.mo "$(DESTDIR)/share/locale/ru/LC_MESSAGES/gprename.mo"
install -m 644 build/locale/sv.mo "$(DESTDIR)/share/locale/sv/LC_MESSAGES/gprename.mo" install -m 644 build/locale/sv.mo "$(DESTDIR)/share/locale/sv/LC_MESSAGES/gprename.mo"
install -m 644 build/locale/zh_CN.mo "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo" install -m 644 build/locale/zh_CN.mo "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo"
@ -33,17 +49,50 @@ diff -u -r gprename-20160905/Makefile gprename-20160905-patched/Makefile
uninstall: clean uninstall: clean
rm -f "$(DESTDIR)/bin/gprename" rm -f "$(DESTDIR)/bin/gprename"
- rm -f "/usr/share/applications/gprename.desktop" - rm -f "/usr/share/applications/gprename.desktop"
+ rm -f "$(DESTDIR)/share/applications/gprename.desktop" + rm -f "$(DESTDIR)/applications/gprename.desktop"
rm -f "$(DESTDIR)/share/applications/gprename-nautilus-actions.xml"
rm -f "$(DESTDIR)/share/man/man1/gprename.1" rm -f "$(DESTDIR)/share/man/man1/gprename.1"
rm -f "$(DESTDIR)/share/locale/ca/LC_MESSAGES/gprename.mo" rm -f "$(DESTDIR)/share/locale/ca/LC_MESSAGES/gprename.mo"
@@ -104,8 +103,7 @@ rm -f "$(DESTDIR)/share/locale/de/LC_MESSAGES/gprename.mo"
@@ -107,8 +106,7 @@
rm -f "$(DESTDIR)/share/locale/ru/LC_MESSAGES/gprename.mo" rm -f "$(DESTDIR)/share/locale/ru/LC_MESSAGES/gprename.mo"
rm -f "$(DESTDIR)/share/locale/sv/LC_MESSAGES/gprename.mo" rm -f "$(DESTDIR)/share/locale/sv/LC_MESSAGES/gprename.mo"
rm -f "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo" rm -f "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo"
- rm -fr "/usr/share/icons/gprename" - rm -fr "/usr/share/icons/gprename"
- update-desktop-database - update-desktop-database
+ rm -fr "$(DESTDIR)/share/icons/gprename" + rm -fr "$(DESTDIR)/icons/gprename"
clean: clean:
rm -rf build rm -rf build
diff -Naur gprename-20220206/bin/gprename gprename-20220206.patched/bin/gprename
--- gprename-20220206/bin/gprename 2022-02-06 21:12:31.000000000 -0500
+++ gprename-20220206.patched/bin/gprename 2022-04-25 18:45:00.881121463 -0400
@@ -137,7 +137,7 @@
$window->add_accel_group( $accel_group );
# Set the window icon
-my $icon = '/usr/share/icons/gprename.png';
+my $icon = '/usr/share/pixmaps/gprename.png';
my $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file( $icon );
$window->set_icon( $pixbuf );
@@ -1472,7 +1472,7 @@
$buffer->create_tag( 'big', size => 20 * 1024 );
$buffer->create_tag( 'italic', style => 'italic' );
my $iter = $buffer->get_start_iter;
- my $icon = '/usr/share/icons/gprename.png';
+ my $icon = '/usr/share/pixmaps/gprename.png';
my $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file( $icon );
$buffer->insert_pixbuf ($iter, $pixbuf);
diff -Naur gprename-20220206/bin/gprename.desktop gprename-20220206.patched/bin/gprename.desktop
--- gprename-20220206/bin/gprename.desktop 2022-02-06 21:16:23.000000000 -0500
+++ gprename-20220206.patched/bin/gprename.desktop 2022-04-25 18:45:12.939321332 -0400
@@ -4,7 +4,7 @@
Name=GPRename
Comment=Rename files and directories in batch
Exec=gprename
-Icon=gprename
+Icon=/usr/share/pixmaps/gprename
Terminal=false
Keywords=renamer;utility;
Categories=Utility;

View File

@ -1,39 +1,30 @@
#!/bin/bash #!/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 # Copyright 2017-2019 Donald Cooley South Haven, IN USA
# All rights reserved. # Copyright 2010 Binh Nguyen <binhvng@gmail.com>
#
# Redistribution and use of this script, with or without modification, is # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# permitted provided that the following conditions are met:
# # 20220425 bkw:
# 1. Redistributions of this script must retain the above copyright # - new maintainer.
# notice, this list of conditions and the following disclaimer. # - update for v20220206.
# # - relicense as WTFPL (permission per mailing list).
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # - put icon in /usr/share/pixmaps.
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # - rework patch for new version.
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # - REQUIRES perl-Gtk3 (not perl-gtk2).
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # - update README and slack-desc (to mention GTK3).
# 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.
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gprename PRGNAM=gprename
VERSION=${VERSION:-20190221} VERSION=${VERSION:-20220206}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch 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 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -43,35 +34,29 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
set -eu set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-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 {} \;
# 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 patch -p1 < $CWD/gprename-makefile-fixups.patch
# 20220425 bkw: note nonstandard use of DESTDIR!
make -j1 install DESTDIR=$PKG/usr PREFIX=/usr make -j1 install DESTDIR=$PKG/usr PREFIX=/usr
gzip -9 $PKG/usr/man/man*/*
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION 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 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install

View File

@ -1,10 +1,10 @@
PRGNAM="gprename" PRGNAM="gprename"
VERSION="20190221" VERSION="20220206"
HOMEPAGE="http://gprename.sourceforge.net/" HOMEPAGE="http://gprename.sourceforge.net/"
DOWNLOAD="https://sourceforge.net/projects/gprename/files/gprename/20190221/gprename-20190221.tar.bz2" DOWNLOAD="https://sourceforge.net/projects/gprename/files/gprename/20220206/gprename-20220206.tar.bz2"
MD5SUM="42cb068f1b423c7d97a13f1da50f90e0" MD5SUM="69183e3e85a26942ef9d7e9322f7aaeb"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="perl-gtk2 perl-libintl" REQUIRES="perl-Gtk3 perl-libintl"
MAINTAINER="Donald Cooley" MAINTAINER="B. Watson"
EMAIL="chytraeu@sdf.org" EMAIL="urchlay@slackware.uk"

View File

@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines. # customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------| |-----handy-ruler------------------------------------------------------|
gprename: gprename (A GTK2 batch renamer for files and directories) gprename: gprename (a GTK3 batch renamer for files and directories)
gprename: gprename:
gprename: GPRename is a complete batch renamer for files and directories and gprename: GPRename is a complete batch renamer for files and directories and
gprename: is licensed under the terms of the GPL version 3. gprename: is licensed under the terms of the GPL version 3.