perl-palm-pdb.SlackBuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. # Slackware build script for perl-palm-pdb
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=perl-palm-pdb
  7. VERSION=${VERSION:-1.400}
  8. BUILD=${BUILD:-1}
  9. TAG=${TAG:-_SBo}
  10. PKGTYPE=${PKGTYPE:-tgz}
  11. ARCH=noarch
  12. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  13. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  14. exit 0
  15. fi
  16. TMP=${TMP:-/tmp/SBo}
  17. PKG=$TMP/package-$PRGNAM
  18. OUTPUT=${OUTPUT:-/tmp}
  19. set -e
  20. SRCNAM="Palm-PDB"
  21. rm -rf $PKG
  22. mkdir -p $TMP $PKG $OUTPUT
  23. cd $TMP
  24. rm -rf $SRCNAM-$VERSION
  25. tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
  26. cd $SRCNAM-$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. perl Makefile.PL \
  31. PREFIX=/usr \
  32. INSTALLDIRS=vendor \
  33. INSTALLVENDORMAN1DIR=/usr/man/man1 \
  34. INSTALLVENDORMAN3DIR=/usr/man/man3
  35. make
  36. make test
  37. make install DESTDIR=$PKG
  38. gzip -9 $PKG/usr/man/man3/*.3
  39. find $PKG -name perllocal.pod \
  40. -o -name ".packlist" \
  41. -o -name "*.bs" \
  42. | xargs rm -f
  43. # the above leaves at least one empty directory, so:
  44. find $PKG -depth -type d -a -empty -delete
  45. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  46. chmod 644 examples/*
  47. cp -a Changes LICENSE README examples $PKG/usr/doc/$PRGNAM-$VERSION
  48. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  49. mkdir -p $PKG/install
  50. cat $CWD/slack-desc > $PKG/install/slack-desc
  51. cd $PKG
  52. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE