myclippings.SlackBuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/bash
  2. # Slackware build script for myclippings
  3. # Written by Cezary M. Kruk (c.kruk@bigfoot.com)
  4. # Modified by the SlackBuilds.org project
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=myclippings
  7. VERSION=${VERSION:-1.0}
  8. BUILD=${BUILD:-1}
  9. TAG=${TAG:-_SBo}
  10. PKGTYPE=${PKGTYPE:-tgz}
  11. ARCH=noarch
  12. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  13. # the name of the created package would be, and then exit. This information
  14. # could be useful to other scripts.
  15. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  16. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  17. exit 0
  18. fi
  19. TMP=${TMP:-/tmp/SBo}
  20. PKG=$TMP/package-$PRGNAM
  21. OUTPUT=${OUTPUT:-/tmp}
  22. set -e
  23. rm -rf $PKG
  24. mkdir -p $TMP $PKG $OUTPUT
  25. cd $TMP
  26. rm -rf $PRGNAM
  27. tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
  28. cd $PRGNAM-$VERSION
  29. chown -R root:root .
  30. find -L . \
  31. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  32. -exec chmod 755 {} \; -o \
  33. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  34. -exec chmod 644 {} \;
  35. # Copying scripts to the correct location
  36. mkdir -p $PKG/usr/bin
  37. cp -a myclippings $PKG/usr/bin
  38. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  39. cp -a Kindle\ 3 Kindle\ 4 COPYING ChangeLog INSTALL README README.Windows.txt THANKS \
  40. $PKG/usr/doc/$PRGNAM-$VERSION
  41. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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