updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / mplayer2-simple-git / PKGBUILD
blobba90c4e6225b950d03cdf1627a0fda6eac60fd66
1 # Maintainer: loonyphoenix < loonyphoenix at gmail >
2 # This package is based on mplayer2-git, but simplifies its building by
3 # linking to the system ffmpeg/libav libraries
5 pkgname=mplayer2-simple-git
6 pkgver=20111023
7 pkgrel=1
8 pkgdesc="A media player"
9 arch=('i686' 'x86_64')
10 license=('GPL')
11 url="http://www.mplayer2.org/"
12 depends=('ffmpeg' 'fontconfig' 'libass' 'libdvdread' 'libdvdnav' 'libgl'
13          'libxss' 'libxxf86dga' 'ttf-dejavu')
14 makedepends=('git' 'libpulse' 'live-media' 'mesa' 'videoproto' 'yasm')
15 optdepends=('libdvdcss: for playback of encrypted dvds'
16             'unrar: for playback of media files inside rar archives')
17 # Some additional makedepends can be added if specific features are needed.
18 # For example, libvdpau, fribidi, libspeex, codecs from AUR for win32 
19 # codecs. If you don't need pulse output, you might want to remove
20 # libpulse from makedpends.
21 backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
22 provides=('mplayer' 'mplayer2')
23 conflicts=('mplayer' 'mplayer2')
24 source=('mplayer.desktop')
25 md5sums=('af6ba58cc34322bf12e46e8d1d42d75f')
27 _gitroot="git://git.mplayer2.org/mplayer2.git"
28 _gitname="mplayer2"
30 build() {
32   # Custom CFLAGS may break the mplayer2 build
33   unset CFLAGS
34   unset LDFLAGS
36   cd "$srcdir"
37   msg "Connecting to GIT server...."
39   if [[ -d "$_gitname" ]]; then
40     cd "$_gitname" && git pull origin
41     msg "The local files are updated."
42   else
43     git clone "$_gitroot" "$_gitname"
44   fi
46   msg "GIT checkout done or server timeout"
47   msg "Starting build..."
49   rm -rf "$srcdir/$_gitname-build"
50   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
51   cd "$srcdir/$_gitname-build"
53   ./configure --prefix=/usr \
54     --language=all \
55     --disable-xvid \
56     --confdir=/etc/mplayer
57   # there's probably no reason left why anyone would want to use xvid's decoder
59   make
62 package() {
63   cd "${srcdir}/${_gitname}-build"
65   make DESTDIR="${pkgdir}" install
67   install -m644 etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
68   install -d -m755 "${pkgdir}/usr/share/mplayer"
69   ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
71   # there is a desktop file where the xpm is, but we don't want that
72   install -Dm644 "${srcdir}/mplayer.desktop" "${pkgdir}/usr/share/applications/mplayer.desktop"
73   install -Dm644 "${srcdir}/${_gitname}/etc/mplayer.xpm" "${pkgdir}/usr/share/pixmaps/mplayer.xpm"