Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

VBAM SlackBuild for r1199

By: a guest on Sep 9th, 2013  |  syntax: Bash  |  size: 2.93 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. # Slackbuild for vbam
  3.  
  4. # Currently maintained by Dugan Chen <thedoogster@gmail.com>
  5.  
  6. # Written by JK Wood <joshuakwood@gmail.com>
  7.  
  8. # Slackbuild is released under the Dog-on-Fire License:
  9. # If use of this script causes your dog to catch on fire,
  10. # you agree to send me five dollars.  Or a picture
  11. # of the dog on fire.
  12. # Otherwise, you're on your own.  I've tested the script
  13. # on my own computer, and it hasn't broken anything.
  14. # So if it does it on your computer, that falls in
  15. # the realm of "Not my problem."
  16. #
  17. # Of course, if you'll send a bug report to the above
  18. # email address, I may be able to see what you did
  19. # wrong and prevent it from happening in the future.
  20. # In which case, I may just send YOU five dollars.
  21.  
  22. # Modified by the SlackBuilds.org project.
  23.  
  24. PRGNAM=vbam
  25. VERSION=r1199
  26. BUILD=${BUILD:-1}
  27. TAG=${TAG:-_SBo}
  28.  
  29. if [ -z "$ARCH" ]; then
  30.   case "$( uname -m )" in
  31.     i?86) ARCH=i486 ;;
  32.     arm*) ARCH=arm ;;
  33.        *) ARCH=$( uname -m ) ;;
  34.   esac
  35. fi
  36.  
  37. CWD=$(pwd)
  38. TMP=${TMP:-/tmp/SBo}
  39. PKG=$TMP/package-$PRGNAM
  40. OUTPUT=${OUTPUT:-/tmp}
  41.  
  42. if [ "$ARCH" = "i486" ]; then
  43.   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  44.   LIBDIRSUFFIX=""
  45.   ASM=ON # x86 ASM optimizations are available.
  46. elif [ "$ARCH" = "i686" ]; then
  47.   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  48.   LIBDIRSUFFIX=""
  49.   ASM=ON
  50. elif [ "$ARCH" = "x86_64" ]; then
  51.   SLKCFLAGS="-O2 -fPIC"
  52.   LIBDIRSUFFIX="64"
  53.   ASM=OFF
  54. else
  55.   SLKCFLAGS="-O2"
  56.   LIBDIRSUFFIX=""
  57.   ASM=OFF
  58. fi
  59.  
  60. set -e
  61.  
  62. # Set to ON to enable FFMPEG A/V recording.
  63. FFMPEG=${FFMPEG:-OFF}
  64.  
  65. rm -rf $PKG
  66. mkdir -p $TMP $PKG $OUTPUT
  67. cd $TMP
  68. rm -rf $PRGNAM-$VERSION
  69. mkdir -p $PRGNAM-$VERSION
  70. cd $PRGNAM-$VERSION
  71. tar xvf $CWD/$PRGNAM-$VERSION-src.tar.?z*
  72. chown -R root:root .
  73. find . \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  74.  -exec chmod 755 {} \; -o \
  75.  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  76.   -exec chmod 644 {} \;
  77.  
  78. cmake . \
  79.   -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  80.   -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
  81.   -DCMAKE_INSTALL_PREFIX="/usr" \
  82.   -DENABLE_ASM_CORE=${ASM} \
  83.   -DENABLE_ASM_SCALERS=${ASM} \
  84.   -DENABLE_FFMPEG=${FFMPEG} \
  85.   -DENABLE_DEBUGGER=OFF \
  86.   -DPNG_LIBRARY=/usr/lib$LIBDIRSUFFIX/libpng.a \
  87.   -DZLIB_LIBRARY=/usr/lib$LIBDIRSUFFIX/libz.a \
  88.   -DENABLE_SDL=OFF
  89.  
  90. make
  91. make install DESTDIR=$PKG
  92.  
  93. find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  94.   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  95.  
  96. mkdir -p $PKG/usr/man/man1
  97. gzip -9c debian/gvbam.1 > $PKG/usr/man/man1/gvbam.1.gz
  98.  
  99. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  100. cp -a doc/* \
  101.   $PKG/usr/doc/$PRGNAM-$VERSION
  102. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  103.  
  104. mkdir -p $PKG/install
  105. cat $CWD/slack-desc > $PKG/install/slack-desc
  106. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  107.  
  108. cd $PKG
  109. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
clone this paste RAW Paste Data