bdf2psf.SlackBuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. # Slackware build script for bdf2psf
  3. # Originally written 2015 Didier Spaier Paruis, France
  4. # Now maintained by B. Watson (yalhcru@gmail.com)
  5. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  6. # 20220110 bkw:
  7. # - take over maintenance.
  8. # - relicense as WTFPL, with permission from Didier.
  9. # - update for v1.207.
  10. # - get rid of temp files.
  11. # - simplify build.
  12. cd $(dirname $0) ; CWD=$(pwd)
  13. PRGNAM=bdf2psf
  14. VERSION=${VERSION:-1.207}
  15. BUILD=${BUILD:-1}
  16. TAG=${TAG:-_SBo}
  17. PKGTYPE=${PKGTYPE:-tgz}
  18. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  19. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  20. exit 0
  21. fi
  22. TMP=${TMP:-/tmp/SBo}
  23. PKG=$TMP/package-$PRGNAM
  24. OUTPUT=${OUTPUT:-/tmp}
  25. # perl script
  26. ARCH=noarch
  27. set -e
  28. rm -rf $PKG
  29. mkdir -p $TMP $PKG $OUTPUT
  30. cd $PKG
  31. ar p $CWD/${PRGNAM}_${VERSION}_all.deb data.tar.xz | tar xvfJ -
  32. chown -R root:root .
  33. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  34. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  35. mv $PKG/usr/share/man $PKG/usr/man
  36. PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
  37. mkdir -p $PKGDOC
  38. mv $PKG/usr/share/doc/$PRGNAM/* $PKGDOC
  39. rm -rf $PKG/usr/share/doc
  40. cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
  41. mkdir -p $PKG/install
  42. cat $CWD/slack-desc > $PKG/install/slack-desc
  43. cd $PKG
  44. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE