gprename.SlackBuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/bash
  2. # Copyright 2022 B. Watson <urchlay@slackware.uk>
  3. # Copyright 2017-2019 Donald Cooley South Haven, IN USA
  4. # Copyright 2010 Binh Nguyen <binhvng@gmail.com>
  5. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  6. # 20220425 bkw:
  7. # - new maintainer.
  8. # - update for v20220206.
  9. # - relicense as WTFPL (permission per mailing list).
  10. # - put icon in /usr/share/pixmaps.
  11. # - rework patch for new version.
  12. # - REQUIRES perl-Gtk3 (not perl-gtk2).
  13. # - update README and slack-desc (to mention GTK3).
  14. cd $(dirname $0) ; CWD=$(pwd)
  15. PRGNAM=gprename
  16. VERSION=${VERSION:-20220206}
  17. BUILD=${BUILD:-1}
  18. TAG=${TAG:-_SBo}
  19. PKGTYPE=${PKGTYPE:-tgz}
  20. ARCH=noarch
  21. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  22. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  23. exit 0
  24. fi
  25. TMP=${TMP:-/tmp/SBo}
  26. PKG=$TMP/package-$PRGNAM
  27. OUTPUT=${OUTPUT:-/tmp}
  28. set -e
  29. rm -rf $PKG
  30. mkdir -p $TMP $PKG $OUTPUT
  31. cd $TMP
  32. rm -rf $PRGNAM-$VERSION
  33. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  34. cd $PRGNAM-$VERSION
  35. chown -R root:root .
  36. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  37. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  38. # Don't run update-desktop-database or install icons on the build host.
  39. # 20220425 bkw: patch also changes icon path to /usr/share/pixmaps
  40. # and sets the man dir to /usr/man.
  41. patch -p1 < $CWD/gprename-makefile-fixups.patch
  42. # 20220425 bkw: note nonstandard use of DESTDIR!
  43. make -j1 install DESTDIR=$PKG/usr PREFIX=/usr
  44. gzip -9 $PKG/usr/man/man*/*
  45. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  46. install -m0644 COPYING.TXT README.TXT $PKG/usr/doc/$PRGNAM-$VERSION
  47. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  48. mkdir -p $PKG/install
  49. cat $CWD/slack-desc > $PKG/install/slack-desc
  50. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  51. cd $PKG
  52. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE