pkgdiff.SlackBuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. # Slackware build script for pkgdiff
  3. # Written by B. Watson (urchlay@slackware.uk)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # Note: on the homepage, it says it requires perl-file-libmagic. This is
  6. # only true of the latest git code. The releases up to 1.7.2 don't require
  7. # it. When there's a new release, it'll be time to add perl-file-libmagic
  8. # to REQUIRES.
  9. cd $(dirname $0) ; CWD=$(pwd)
  10. PRGNAM=pkgdiff
  11. VERSION=${VERSION:-1.7.2}
  12. BUILD=${BUILD:-1}
  13. TAG=${TAG:-_SBo}
  14. PKGTYPE=${PKGTYPE:-tgz}
  15. ARCH=noarch
  16. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  17. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  18. exit 0
  19. fi
  20. TMP=${TMP:-/tmp/SBo}
  21. PKG=$TMP/package-$PRGNAM
  22. OUTPUT=${OUTPUT:-/tmp}
  23. set -e
  24. rm -rf $PKG
  25. mkdir -p $TMP $PKG/usr $OUTPUT
  26. cd $TMP
  27. rm -rf $PRGNAM-$VERSION
  28. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  29. cd $PRGNAM-$VERSION
  30. chown -R root:root .
  31. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  32. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  33. DESTDIR=$PKG make install
  34. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  35. cp -a LICENSE README doc/Readme.html $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