bdfedit.SlackBuild 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/bash
  2. # Slackware build script for bdfedit
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/
  5. # for details.
  6. # Why do we need another BDF editor? Because gbdfed keeps segfaulting on
  7. # me. Also, bdfedit's UI uses a single window instead of the multiple
  8. # windows gbdfed uses (which is better will be a matter of personal
  9. # preference, but I prefer 1 window). fontforge is also capable of
  10. # editing BDFs but its UI is irritating (to me anyway).
  11. # Yes, this is old software that hasn't been maintained in 12+ years,
  12. # but it works fine.
  13. cd $(dirname $0) ; CWD=$(pwd)
  14. PRGNAM=bdfedit
  15. VERSION=${VERSION:-1.3}
  16. BUILD=${BUILD:-1}
  17. TAG=${TAG:-_SBo}
  18. PKGTYPE=${PKGTYPE:-tgz}
  19. ARCH=noarch
  20. # no CFLAGS or LIBDIRSUFFIX needed here
  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.gz
  34. cd $PRGNAM$VERSION
  35. chown -R root:root .
  36. # upstream perms are bad, do this instead of find|chmod.
  37. chmod 755 .
  38. chmod 644 *
  39. mkdir -p $PKG/usr/bin
  40. # instead of having bdfedit source completion.tcl, just include its
  41. # contents directly in bdfedit. Avoids having to create a private
  42. # lib or share dir. Also set correct path to wish in #! line.
  43. ( echo '#!/usr/bin/wish -f'
  44. cat completion.tcl
  45. sed '1,5d' $PRGNAM ) \
  46. > $PKG/usr/bin/$PRGNAM
  47. chmod 755 $PKG/usr/bin/$PRGNAM
  48. # .desktop and icon made for this build. Don't laugh, I'm not
  49. # a graphic designer, OK?
  50. mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
  51. cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
  52. cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
  53. # man page written for this build (copy/paste from readme, mostly).
  54. mkdir -p $PKG/usr/man/man1
  55. gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
  56. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  57. cp -a $PRGNAM.* *.$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
  58. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  59. mkdir -p $PKG/install
  60. cat $CWD/slack-desc > $PKG/install/slack-desc
  61. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  62. cd $PKG
  63. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE