dvd-slideshow.SlackBuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. # Slackware build script for dvd-slideshow
  3. # Maintained by Klaatu @member.fsf.org
  4. # Written by Giovanne Castro <giovannefc@terra.com.br>
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=dvd-slideshow
  7. VERSION=${VERSION:-0.8.6_1}
  8. SRCVER=$(echo $VERSION | tr _ -)
  9. ARCH=noarch
  10. BUILD=${BUILD:-1}
  11. TAG=${TAG:-_SBo}
  12. PKGTYPE=${PKGTYPE:-tgz}
  13. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  14. # the name of the created package would be, and then exit. This information
  15. # could be useful to other scripts.
  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 $OUTPUT
  26. cd $TMP
  27. rm -rf $PRGNAM-$SRCVER
  28. tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
  29. cd $PRGNAM-$SRCVER
  30. chown -R root:root .
  31. find -L . \
  32. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  33. -o -perm 511 \) -exec chmod 755 {} \; -o \
  34. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  35. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  36. mkdir -p $PKG/usr/bin
  37. cp -a dir2slideshow \
  38. dvd-burn \
  39. dvd-menu \
  40. dvd-slideshow \
  41. gallery1-to-slideshow \
  42. jigl2slideshow $PKG/usr/bin
  43. mkdir -p $PKG/usr/man/man1
  44. cp -a man/* $PKG/usr/man/man1
  45. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  46. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  47. find $PKG/usr/man -type f -exec gzip -9 {} \;
  48. for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
  49. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  50. cp -a *.txt dvd-slideshowrc $PKG/usr/doc/$PRGNAM-$VERSION
  51. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  52. mkdir -p $PKG/install
  53. cat $CWD/slack-desc > $PKG/install/slack-desc
  54. cd $PKG
  55. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE