findimagedupes.SlackBuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # Slackware build script for findimagedupes
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20210910 bkw: update for v2.19.1.
  6. cd $(dirname $0) ; CWD=$(pwd)
  7. PRGNAM=findimagedupes
  8. VERSION=${VERSION:-2.19.1}
  9. BUILD=${BUILD:-1}
  10. TAG=${TAG:-_SBo}
  11. PKGTYPE=${PKGTYPE:-tgz}
  12. ARCH=noarch
  13. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  14. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  15. exit 0
  16. fi
  17. TMP=${TMP:-/tmp/SBo}
  18. PKG=$TMP/package-$PRGNAM
  19. OUTPUT=${OUTPUT:-/tmp}
  20. set -e
  21. rm -rf $PKG $TMP/$PRGNAM
  22. mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
  23. cd $TMP/$PRGNAM
  24. rm -rf $PRGNAM-$VERSION
  25. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  26. # 2.18 has an enclosing dir in the tarball, 2.19 doesn't, this worx with both:
  27. [ -d $PRGNAM-$VERSION ] && cd $PRGNAM-$VERSION
  28. chown -R root:root .
  29. chmod 644 *
  30. # use private per-user dirs for Inline's compiled code.
  31. sed -i \
  32. -e '/^use *Inline/iBEGIN { mkdir("$ENV{HOME}/.findimagedupes-inline"); }' \
  33. -e '/DIRECTORY/s,=>.*,=> "$ENV{HOME}/.findimagedupes-inline";,' \
  34. $PRGNAM
  35. install -D -m0755 $PRGNAM $PKG/usr/bin/$PRGNAM
  36. mkdir -p $PKG/usr/man/man1
  37. pod2man -s1 --stderr -cSlackBuilds.org -r$VERSION $PRGNAM | \
  38. gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
  39. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  40. cp -a README* COPYING $PKG/usr/doc/$PRGNAM-$VERSION
  41. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  42. mkdir -p $PKG/install
  43. cat $CWD/slack-desc > $PKG/install/slack-desc
  44. cd $PKG
  45. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE