SHARE
TWEET

Untitled

a guest Jul 24th, 2013 286 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. # Slackware build script for tragtor
  4.  
  5. PRGNAM=tragtor
  6. BUILD=${BUILD:-1}
  7. TAG=${TAG:-_sbs}
  8.  
  9. if [ -z "$ARCH" ]; then
  10.   case "$( uname -m )" in
  11.     i?86) ARCH=i486 ;;
  12.     arm*) ARCH=arm ;;
  13.        *) ARCH=$( uname -m ) ;;
  14.   esac
  15. fi
  16.  
  17. CWD=$(pwd)
  18. TMP=${TMP:-/tmp/sbs}
  19. PKG=$TMP/package-$PRGNAM
  20. OUTPUT=${OUTPUT:-/tmp}
  21.  
  22. set -eu
  23.  
  24. rm -rf $PKG
  25. mkdir -p $TMP $PKG $OUTPUT
  26. cd $TMP
  27. rm -rf $PRGNAM
  28. mkdir $PRGNAM
  29. cd $PRGNAM
  30. tar xvfz $CWD/$PRGNAM.tar.gz
  31. chown -R root:root .
  32. find . \
  33.  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  34.  -exec chmod 755 {} \; -o \
  35.  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  36.  -exec chmod 644 {} \;
  37.  
  38. cp -a usr/ $PKG
  39.  
  40. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  41.   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  42.  
  43. VERSION=${VERSION:-$(sed q $TMP/$PRGNAM/usr/share/$PRGNAM/version)}
  44.  
  45. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  46. cp -a $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
  47. rm -rf $PKG/usr/share/doc
  48. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  49.  
  50. mkdir -p $PKG/install
  51.  
  52. (
  53. cat  << 'EOF'
  54.        |---------------------------------------------------------------|
  55. tragtor: traGtor (GUI for FFmpeg)
  56. tragtor:
  57. tragtor: Tragtor is a graphical user interface for the awesome
  58. tragtor: conversion tool ffmpeg for the use with Linux-OS. It is
  59. tragtor: written in Python and uses the GTK-Engine for displaying
  60. tragtor: it’s interface.
  61. tragtor:
  62. tragtor: http://mein-neues-blog.de/tragtor-gui-for-ffmpeg/
  63. tragtor:
  64. tragtor:
  65. tragtor:
  66. EOF
  67. ) > $PKG/install/slack-desc
  68.  
  69. (
  70. cat  << 'EOF'
  71. if [ -x /usr/bin/update-desktop-database ]; then
  72.   /usr/bin/update-desktop-database -q usr/share/applications
  73. fi
  74.  
  75.  
  76. EOF
  77. ) > $PKG/install/doinst.sh
  78.  
  79. cd $PKG
  80. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
RAW Paste Data
Top