updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ffmpeg-mt-lite / PKGBUILD
blob03b1a0d330c8d8023ba2a8a453c008fb7739d037
1 # Contributor: Jason <jason52lh # gmail com>
2 pkgname=ffmpeg-mt-lite
3 pkgver=20110226
4 pkgrel=1
5 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix (Multithread build, git version, needed by mplayer-mt)"
6 arch=('i686' 'x86_64')
7 url="http://ffmpeg.mplayerhq.hu/"
8 license=('GPL')
10 # set 1 to force not to use alsa libs
11 _noalsa=0
13 # depend on only what you already have
14 [ "x$_noalsa" == "x0" ] && _alsa=$(pacman -Q alsa-lib 2>/dev/null | awk '{print $1}')
15 _xvidcore=$(pacman -Q xvidcore 2>/dev/null | awk '{print $1}')
16 _faac=$(pacman -Q faac 2>/dev/null | awk '{print $1}')
17 _libvpx=$(pacman -Q libvpx 2>/dev/null | awk '{print $1}')
18 _lame=$(pacman -Q lame 2>/dev/null | awk '{print $1}')
19 _libvdpau=$(pacman -Q libvdpau 2>/dev/null | awk '{print $1}')
20 _x264=$(pacman -Q x264 2>/dev/null | awk '{print $1}')
22 depends=('zlib' 'libxext' 'libxfixes' 'libvorbis' 'libtheora' $_x264 $_xvidcore $_libvpx $_faac $_lame $_alsa)
23 makedepends=('git' 'yasm')
24 provides=("ffmpeg")
25 conflicts=('ffmpeg')
26 source=()
27 md5sums=()
29 _gitroot="git://repo.or.cz/FFMpeg-mirror/mplayer-patches.git"
30 _gitname="ffmpeg-mt"
32 build() {
33   cd "$srcdir"
34   msg "Connecting to GIT server...."
36   if [ -d "$srcdir/$_gitname" ] ; then
37     cd $_gitname && git pull origin
38     msg "The local files are updated."
39   else
40     git clone $_gitroot $_gitname
41     cd $_gitname
42     git checkout --track -b mt origin/mt
43   fi
45   msg "GIT checkout done or server timeout"
46   msg "Starting make..."
47   
48   cd "$srcdir/$_gitname"
49   rm -rf libswscale/
50   git submodule init
51   git submodule update
52   
53   _options=""
54   [ ! -z $_xvidcore ] && _options="$_options --enable-libxvid"
55   [ ! -z $_x264 ] && _options="$_options --enable-libx264"
56   [ ! -z $_faac ] && _options="$_options --enable-libfaac"
57   [ ! -z $_lame ] && _options="$_options --enable-libmp3lame"
58   [ ! -z $_libvpx ] && _options="$_options --enable-libvpx"
59   [ "x$_noalsa" == "x1" ] && _options="$_options --disable-outdev=alsa"
61   ./configure \
62       --prefix=/usr --enable-shared --enable-pthreads --arch=`uname -m` \
63       --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
64       --enable-libvorbis --enable-libtheora --enable-x11grab $_options
66   make || return 1
67   make doc/ff{mpeg,server}.1 || return 1
69 package(){
70   cd ${srcdir}/$_gitname
71   make DESTDIR="$pkgdir" install || return 1
72   make DESTDIR="$pkgdir" install-man || return 1
73   rm `find $pkgdir -name "*.a"`