1 # Contributor: Benjamin Bukowski <benjamin.bukowski@googlemail.com>
5 pkgdesc="A movie player for linux"
7 url="http://www.mplayerhq.hu/"
10 makedepends=('subversion' 'yasm' 'git')
11 provides=("mplayer=$pkgver" "mplayer-svn=$pkgver")
13 backup=("etc/mplayer/mplayer.conf"
14 "etc/mplayer/codecs.conf"
15 "etc/mplayer/input.conf"
16 "etc/mplayer/menu.conf"
17 "etc/mplayer/dvb-menu.conf")
18 install='mplayer-svn.install'
19 source=('configure-copy-disabled-features.patch' 'mplayer.conf')
21 md5sums=('db50b7f27969045172ed7d1eebca47cf'
22 'd82577aa11f1077dea79ccdda27d0641')
24 _svntrunk=svn://svn.mplayerhq.hu/mplayer/trunk
27 _ffmpeggitroot="git://git.videolan.org/ffmpeg.git"
28 _ffmpeggitname="ffmpeg"
33 if [ -d $_svnmod/.svn ]; then
34 (cd $_svnmod && svn up -r $pkgver) || return 1
36 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod || return 1
38 msg "SVN checkout done or server timeout"
40 msg "Retrieving latest ffmpeg sources from git"
42 if [[ -d $_ffmpeggitname ]] ; then
46 git clone --depth 1 $_ffmpeggitroot $_ffmpeggitname || return 1
48 msg "GIT checkout done"
50 rm -rf "$srcdir/$_svnmod-build"
51 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
52 cd "$srcdir/$_svnmod-build"
54 # Applying some patches...
55 for patch in ../*.patch; do
56 msg "Applying `basename $patch`..."
60 # Use the mplayer's configure script autodetection.
61 # GUI is disabled by default,most options are autodetected.
62 # Make sure you have the related package (ex: lirc) before building.
63 # go in souce and run ./configure --help to see what's disabled by default
64 # for GUI add '--enable-gui'
65 # for Joystick add '--enable-joystick'
67 # Custom FLAGS break the mplayer build
70 # If you experience problems with mkvs, try to add the following option
71 # to configure '--extra-cflags=-fno-strict-aliasing'
73 ./configure --prefix=/usr --confdir=/etc/mplayer --language=all || return 1
75 [ "$CARCH" == "i686" ] && sed 's|-march=i484|-march=i686|g' -i config.mak
77 msg "Starting make..."
80 make DESTDIR="$pkgdir/" install || return 1
82 install -Dm644 etc/{codecs.conf,dvb-menu.conf,example.conf,input.conf,menu.conf} $pkgdir/etc/mplayer/ || return 1
83 install -dm755 $pkgdir/usr/share/mplayer/ || return 1
84 install -m644 etc/{mplayer.desktop,mplayer.ico,mplayer.png} $pkgdir/usr/share/mplayer/ || return 1
85 install -m644 disabled_features $pkgdir/etc/mplayer/ || return 1
86 install -m644 $srcdir/mplayer.conf $pkgdir/etc/mplayer/ || return 1