font-unscii.SlackBuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # Slackware build script for font-unscii
  3. # Written by B. Watson (urchlay@slackware.uk)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20210326 bkw: updated for v2.1, reflow README, new homepage/download
  6. cd $(dirname $0) ; CWD=$(pwd)
  7. PRGNAM=font-unscii
  8. VERSION=${VERSION:-2.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. SRCNAM=unscii
  21. SRCDIR=$SRCNAM-$VERSION-src
  22. set -e
  23. rm -rf $PKG
  24. mkdir -p $TMP $PKG $OUTPUT
  25. cd $TMP
  26. rm -rf $SRCDIR
  27. tar xvf $CWD/$SRCDIR.tar.gz
  28. cd $SRCDIR
  29. chown -R root:root .
  30. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  31. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  32. make
  33. mkdir -p $PKG/usr/share/fonts/misc \
  34. $PKG/usr/share/fonts/OTF \
  35. $PKG/usr/share/fonts/TTF
  36. cp *.otf $PKG/usr/share/fonts/OTF
  37. cp *.ttf $PKG/usr/share/fonts/TTF
  38. cp *.pcf $PKG/usr/share/fonts/misc
  39. gzip -9 $PKG/usr/share/fonts/misc/*
  40. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  41. cp -a $SRCNAM.txt $PKG/usr/doc/$PRGNAM-$VERSION
  42. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  43. mkdir -p $PKG/install
  44. cat $CWD/slack-desc > $PKG/install/slack-desc
  45. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  46. cd $PKG
  47. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE