Guest User

Untitled

a guest
Nov 7th, 2010
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.79 KB | None | 0 0
  1. # Contributor: graysky <graysky AT archlinux DOT us>
  2. # Contributor: jiribb <[email protected]>
  3. # Contributor: David Spicer <azleifel at googlemail dot com>
  4. # Contributor: Andrew Brouwers
  5. # Maintainer: Stefan Husmann <[email protected]>
  6. # Maintainer: David Spicer <azleifel at googlemail dot com>
  7.  
  8. pkgbase=handbrake-svn
  9. pkgname=handbrake-svn
  10. true && pkgname=('handbrake-svn' 'handbrake-svn-cli')
  11. pkgver=3654
  12. pkgrel=1
  13. arch=('i686' 'x86_64')
  14. url="http://handbrake.fr/"
  15. license=('GPL')
  16. depends=('bzip2' 'gcc-libs' 'gstreamer0.10-base' 'libnotify' 'hicolor-icon-theme')
  17. makedepends=('intltool' 'python2' 'gettext' 'subversion' 'wget' 'yasm')
  18. conflicts=('handbrake-gtk' 'handbrake')
  19. provides=('handbrake-gtk' 'handbrake')
  20.  
  21. _svntrunk=svn://svn.handbrake.fr/HandBrake/trunk
  22. _svnmod=hb-trunk
  23.  
  24. build() {
  25.   cd ${srcdir}
  26.  
  27.   msg "Connecting to ${_svnmod} SVN server...."
  28.   if [ -d ${_svnmod}/.svn ]; then
  29.     ( cd ${_svnmod} && svn up -r $pkgver )
  30.   else
  31.     svn co ${_svntrunk} --config-dir ./ -r $pkgver ${_svnmod}
  32.   fi
  33.   msg "SVN checkout done or server timeout"
  34.   msg "Starting make..."
  35.  
  36.   # Create build directory and copy source
  37.   [ -d ${srcdir}/${_svnmod}-build ] && rm -rf ${srcdir}/${_svnmod}-build
  38.   cp -r ${srcdir}/${_svnmod} ${srcdir}/${_svnmod}-build
  39.  
  40.   # Create build-specific temporary directory
  41.   # (ffmpeg needs a temporary directory that is not set noexec)
  42.   [ -d ${srcdir}/tmp ] && rm -rf ${srcdir}/tmp
  43.   install -d -m755 ${srcdir}/tmp
  44.  
  45.   #
  46.   # Build
  47.   #
  48.  
  49.   cd ${srcdir}/${_svnmod}-build
  50.  
  51.   # Substitutions for python2
  52.   sed -i -e 's|python $(srcdir)|python2 $(srcdir)|' gtk/src/Makefile.am
  53.   sed -i -e '1c#! /usr/bin/python2' gtk/src/makedeps.py
  54.   sed -i -e '1c#! /usr/bin/python2' gtk/src/create_resources.py
  55.   sed -i -e '1c#! /usr/bin/python2' gtk/src/quotestring.py
  56.  
  57.   LDFLAGS=$(echo $LDFLAGS | sed "s/-Wl,--as-needed//")
  58.   # Use --disable-gtk-update-checks because we don't want to download gui updates
  59.   ./configure --force --verbose --prefix=/usr --disable-gtk-update-checks --launch-jobs=0
  60.  
  61.   cd ${srcdir}/${_svnmod}-build/build
  62.   TMPDIR=${srcdir}/tmp make
  63. }
  64.  
  65. package_handbrake-svn() {
  66.   pkgdesc="Multiplatform, multithreaded DVD to MPEG-4/H264/Theora converter (GTK GUI)"
  67.   install=${pkgname}.install
  68.  
  69.   cd ${srcdir}/${_svnmod}-build/build
  70.   make DESTDIR="${pkgdir}" install
  71.  
  72.   # Delete icon-theme.cache (is rebuilt on install)
  73.   rm -f ${pkgdir}/usr/share/icons/hicolor/icon-theme.cache
  74. }
  75.  
  76. package_handbrake-svn-cli() {
  77.   pkgdesc="Multiplatform, multithreaded DVD to MPEG-4/H264/Theora converter (CLI version)"
  78.   depends=('bzip2' 'gcc-libs' 'zlib')
  79.  
  80.   cd ${srcdir}/${_svnmod}-build/build
  81.   install -D -m755 HandBrakeCLI "${pkgdir}/usr/bin/HandBrakeCLI"
  82.  
  83.   # Remove build directories
  84.   rm -rf ${srcdir}/tmp
  85.   rm -rf ${srcdir}/${_svnmod}-build
  86. }
Advertisement
Add Comment
Please, Sign In to add comment