summaryrefslogtreecommitdiff
path: root/community/mplayer2/PKGBUILD
blob: 018c8470a51c5b356764a4c02ec9ef3baa0bc6e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# $Id: PKGBUILD 82332 2013-01-15 11:35:04Z allan $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Martin Panter <vadmium+aur@gmail.com>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>

pkgname=mplayer2
pkgver=20121128
pkgrel=2
pkgdesc='Advanced general-purpose media player. A fork of the original MPlayer project'
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url="http://www.mplayer2.org/"
install=$pkgname.install
depends=('a52dec' 'aalib' 'cdparanoia' 'desktop-file-utils' 'enca' 'faad2' 'ffmpeg' 'fontconfig'
         'freetype2' 'jack' 'ladspa' 'lame' 'libass' 'libbluray' 'libcaca' 'libcdio-paranoia' 'libdca' 'libdvdcss'
         'libdvdnav' 'libdvdread' 'libjpeg' 'libmad' 'libpulse' 'libquvi' 'libtheora'
         'libxinerama' 'libxss' 'libxv' 'libxxf86dga' 'libxxf86vm' 'mpg123' 'ncurses' 'sdl' 'ttf-dejavu')
if [ "$CARCH" != "mips64el" ]; then
depends+=('libgl' 'libvdpau' 'lirc-utils')
fi
makedepends=('mesa' 'unzip' 'yasm' 'python' 'python-docutils')
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
provides=('mplayer')
conflicts=('mplayer')
options=(!emptydirs)
source=(ftp://ftp.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.xz
        cdio-api-fixes.patch)
md5sums=('696adb2503b2202fe39de6c98b573cd6'
         '5ff5fa9d0fd50239ed3a1756b31e6a9d')

build() {
  cd $srcdir/$pkgname-$pkgver

  sed 's/gmplayer/mplayer/g' -i etc/mplayer.desktop
  find -type f -exec sed -e 's/python3/python/' -i {} \;

  [ "$CARCH" != "mips64el" ] && extra="--enable-runtime-cpudetection"

  patch -Np1 -i $srcdir/cdio-api-fixes.patch

  ./configure --prefix=/usr --confdir=/etc/mplayer \
              --enable-translation --language=all \
              --enable-joystick \
              --disable-speex \
              --disable-openal \
              --disable-libdv \
              --disable-musepack \
              $extra
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install

  install -Dm644 etc/{codecs.conf,input.conf,example.conf} $pkgdir/etc/mplayer/
  install -dm755 $pkgdir/usr/share/mplayer/
  ln -s /usr/share/fonts/TTF/DejaVuSans.ttf $pkgdir/usr/share/mplayer/subfont.ttf

  install -dm755 $pkgdir/usr/share/applications/
  install -m 644 etc/mplayer.desktop $pkgdir/usr/share/applications/
}