1 # Contributor: graysky <graysky AT archlinux DOT us>
2 # Contributor: jiribb <jiribb@gmail.com>
3 # Contributor: David Spicer <azleifel at googlemail dot com>
4 # Contributor: Andrew Brouwers
5 # Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
6 # Maintainer: David Spicer <azleifel at googlemail dot com>
8 # This PKGBUILD uses a split package in AUR workaround!
9 # (See https://bugs.archlinux.org/task/16394#comment68053)
13 true && pkgname=('handbrake-svn' 'handbrake-cli-svn')
16 arch=('i686' 'x86_64')
17 url="http://handbrake.fr/"
19 makedepends=('intltool' 'python2' 'gettext' 'subversion' 'wget' 'yasm')
21 _svntrunk=svn://svn.handbrake.fr/HandBrake/trunk
27 msg "Connecting to ${_svnmod} SVN server...."
28 if [ -d ${_svnmod}/.svn ]; then
29 ( cd ${_svnmod} && svn up -r $pkgver )
31 svn co ${_svntrunk} --config-dir ./ -r $pkgver ${_svnmod}
33 msg "SVN checkout done or server timeout"
34 msg "Starting the build..."
36 # Copy source for the build
37 [ -d ${srcdir}/${_svnmod}-build ] && rm -rf ${srcdir}/${_svnmod}-build
38 cp -r ${srcdir}/${_svnmod} ${srcdir}/${_svnmod}-build
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
49 cd ${srcdir}/${_svnmod}-build
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
57 # Use --disable-gtk-update-checks because we don't want to download gui updates
58 ./configure --force --verbose --prefix=/usr --disable-gtk-update-checks --launch-jobs=0
60 cd ${srcdir}/${_svnmod}-build/build
61 TMPDIR=${srcdir}/tmp make
64 package_handbrake-svn() {
65 pkgdesc="Multiplatform, multithreaded DVD to MPEG-4/H264/Theora converter (GUI version)"
66 optdepends=('gstreamer0.10-base-plugins: For Preview Window'
67 'gstreamer0.10-bad-plugins: For Preview Window'
68 'gstreamer0.10-good-plugins: For Preview Window'
69 'gstreamer0.10-ugly-plugins: For Preview Window'
70 'gstreamer0.10-ffmpeg: For Preview Window')
71 provides=('handbrake')
72 conflicts=('handbrake')
73 install=${pkgname}.install
75 cd ${srcdir}/${_svnmod}-build/build
76 make DESTDIR="${pkgdir}" install
78 rm ${pkgdir}/usr/bin/HandBrakeCLI
80 # Delete icon-theme.cache (is rebuilt on install)
81 rm -f ${pkgdir}/usr/share/icons/hicolor/icon-theme.cache
84 package_handbrake-cli-svn() {
85 pkgdesc="Multiplatform, multithreaded DVD to MPEG-4/H264/Theora converter (CLI version)"
86 depends=('bzip2' 'fribidi' 'gcc-libs' 'zlib')
87 provides=('handbrake-cli')
88 conflicts=('handbrake-cli')
90 install -D -m755 ${srcdir}/${_svnmod}-build/build/HandBrakeCLI ${pkgdir}/usr/bin/HandBrakeCLI
92 # Remove build directories
94 rm -rf ${srcdir}/${_svnmod}-build
97 # Global pkgdesc and depends are here so that they will be picked up by AUR
98 pkgdesc="Multiplatform, multithreaded DVD to MPEG-4/H264/Theora converter"
99 depends=('bzip2' 'dbus-glib' 'desktop-file-utils' 'fribidi' 'gstreamer0.10-base' 'gtk2' 'hicolor-icon-theme' 'libnotify' 'udev')