diff options
author | B. Watson <yalhcru@gmail.com> | 2022-04-25 18:50:55 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-04-29 10:30:54 -0400 |
commit | d8189217b29cd9a2be2d0ee9d63b3be66f8c541d (patch) | |
tree | 582c749fd6ed7b1c757a84deab26b82486a3c304 | |
parent | e83c4eb40798e6efed57a1d62538fe8365d7b513 (diff) |
misc/gprename: Updated for version 20220206, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r-- | misc/gprename/README | 2 | ||||
-rw-r--r-- | misc/gprename/gprename-makefile-fixups.patch | 81 | ||||
-rw-r--r-- | misc/gprename/gprename.SlackBuild | 63 | ||||
-rw-r--r-- | misc/gprename/gprename.info | 12 | ||||
-rw-r--r-- | misc/gprename/slack-desc | 2 |
5 files changed, 98 insertions, 62 deletions
diff --git a/misc/gprename/README b/misc/gprename/README index 12a885b2e7a4..5107c657b4ca 100644 --- a/misc/gprename/README +++ b/misc/gprename/README @@ -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 licensed under the terms of the GNU General Public Licence version 3. diff --git a/misc/gprename/gprename-makefile-fixups.patch b/misc/gprename/gprename-makefile-fixups.patch index cba26e8a9678..1b6bac478561 100644 --- a/misc/gprename/gprename-makefile-fixups.patch +++ b/misc/gprename/gprename-makefile-fixups.patch @@ -1,27 +1,43 @@ -diff -u -r gprename-20160905/Makefile gprename-20160905-patched/Makefile ---- gprename-20160905/Makefile 2016-09-05 21:13:20.000000000 +0100 -+++ gprename-20160905-patched/Makefile 2017-08-29 16:24:44.033333612 +0100 -@@ -45,8 +45,8 @@ +diff -Naur gprename-20220206/Makefile gprename-20220206.patched/Makefile +--- gprename-20220206/Makefile 2022-02-06 21:15:52.000000000 -0500 ++++ gprename-20220206.patched/Makefile 2022-04-25 18:44:43.817838632 -0400 +@@ -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 install -d "$(DESTDIR)" install -d "$(DESTDIR)/bin" - install -d "/usr/share" - install -d "/usr/share/icons" + install -d "$(DESTDIR)/share" -+ install -d "$(DESTDIR)/share/icons" ++ install -d "$(DESTDIR)/share/pixmaps" install -d "$(DESTDIR)/share/applications" - install -d "$(DESTDIR)/share/man" - install -d "$(DESTDIR)/share/man/man1" -@@ -67,7 +67,7 @@ +- install -d "$(DESTDIR)/share/man" +- install -d "$(DESTDIR)/share/man/man1" ++ 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 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 "$(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/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/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" @@ -33,17 +49,50 @@ diff -u -r gprename-20160905/Makefile gprename-20160905-patched/Makefile uninstall: clean rm -f "$(DESTDIR)/bin/gprename" - rm -f "/usr/share/applications/gprename.desktop" -+ rm -f "$(DESTDIR)/share/applications/gprename.desktop" - rm -f "$(DESTDIR)/share/applications/gprename-nautilus-actions.xml" ++ rm -f "$(DESTDIR)/applications/gprename.desktop" rm -f "$(DESTDIR)/share/man/man1/gprename.1" 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/sv/LC_MESSAGES/gprename.mo" rm -f "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo" - rm -fr "/usr/share/icons/gprename" - update-desktop-database -+ rm -fr "$(DESTDIR)/share/icons/gprename" ++ rm -fr "$(DESTDIR)/icons/gprename" clean: 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; diff --git a/misc/gprename/gprename.SlackBuild b/misc/gprename/gprename.SlackBuild index 0cfe15ce9ccb..76975fb82dea 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 diff --git a/misc/gprename/gprename.info b/misc/gprename/gprename.info index eaf7ba2fcf5e..7308205b8b6e 100644 --- a/misc/gprename/gprename.info +++ b/misc/gprename/gprename.info @@ -1,10 +1,10 @@ PRGNAM="gprename" -VERSION="20190221" +VERSION="20220206" HOMEPAGE="http://gprename.sourceforge.net/" -DOWNLOAD="https://sourceforge.net/projects/gprename/files/gprename/20190221/gprename-20190221.tar.bz2" -MD5SUM="42cb068f1b423c7d97a13f1da50f90e0" +DOWNLOAD="https://sourceforge.net/projects/gprename/files/gprename/20220206/gprename-20220206.tar.bz2" +MD5SUM="69183e3e85a26942ef9d7e9322f7aaeb" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="perl-gtk2 perl-libintl" -MAINTAINER="Donald Cooley" -EMAIL="chytraeu@sdf.org" +REQUIRES="perl-Gtk3 perl-libintl" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/misc/gprename/slack-desc b/misc/gprename/slack-desc index 62732fcb4eae..5be072bb2802 100644 --- a/misc/gprename/slack-desc +++ b/misc/gprename/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----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 is a complete batch renamer for files and directories and gprename: is licensed under the terms of the GPL version 3. |