lddot.SlackBuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # Slackware build script for lddot
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20210909 bkw: BUILD=2, actually install the man page in /usr/man.
  6. cd $(dirname $0) ; CWD=$(pwd)
  7. PRGNAM=lddot
  8. VERSION=${VERSION:-0.2}
  9. BUILD=${BUILD:-2}
  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
  22. mkdir -p $TMP $PKG $OUTPUT
  23. cd $TMP
  24. rm -rf $PRGNAM-$VERSION
  25. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  26. cd $PRGNAM-$VERSION
  27. chown -R root:root .
  28. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  29. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  30. mkdir -p $PKG/usr/bin $PKG/usr/man/man1
  31. install -m0755 $PRGNAM $PKG/usr/bin
  32. gzip -9c < doc/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
  33. rm -f doc/$PRGNAM.1
  34. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  35. cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION
  36. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  37. mkdir -p $PKG/install
  38. cat $CWD/slack-desc > $PKG/install/slack-desc
  39. cd $PKG
  40. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE