bdf2psf.SlackBuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/bash
  2. # Slackware build script for bdf2psf
  3. # Originally written 2015 Didier Spaier Paruis, France
  4. # Now maintained by B. Watson (urchlay@slackware.uk)
  5. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  6. # 20221228 bkw: move ARCH assignment to top of script.
  7. # 20220110 bkw:
  8. # - take over maintenance.
  9. # - relicense as WTFPL, with permission from Didier.
  10. # - update for v1.207.
  11. # - get rid of temp files.
  12. # - simplify build.
  13. cd $(dirname $0) ; CWD=$(pwd)
  14. PRGNAM=bdf2psf
  15. VERSION=${VERSION:-1.207}
  16. BUILD=${BUILD:-1}
  17. TAG=${TAG:-_SBo}
  18. PKGTYPE=${PKGTYPE:-tgz}
  19. # perl script
  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 $PKG
  32. ar p $CWD/${PRGNAM}_${VERSION}_all.deb data.tar.xz | tar xvfJ -
  33. chown -R root:root .
  34. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  35. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  36. mv $PKG/usr/share/man $PKG/usr/man
  37. PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
  38. mkdir -p $PKGDOC
  39. mv $PKG/usr/share/doc/$PRGNAM/* $PKGDOC
  40. rm -rf $PKG/usr/share/doc
  41. cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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