Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 4th, 2011  |  syntax: Bash  |  size: 2.30 KB  |  hits: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: cantabile <cantabile dot desu at gmail dot com>
  2. # Contributor: extcake < extcake@gmail.com >
  3. # Contributor: loonyphoenix < loonyphoenix at gmail >
  4.  
  5. pkgname=mplayer2-git
  6. pkgver=20110404
  7. pkgrel=1
  8. pkgdesc="A movie player for linux"
  9. arch=('i686' 'x86_64')
  10. license=('GPL')
  11. url="http://www.mplayer2.org/"
  12. depends=('fontconfig' 'freetype2' 'libgl' 'libxss' 'libxxf86dga' 'sdl' 'ttf-dejavu' 'ffmpeg' 'libass' 'alsa-lib') #is sdl really needed? --loonyphoenix
  13. makedepends=('git' 'mesa' 'python2' 'unzip' 'videoproto' 'yasm' 'libpulse' 'libvdpau') #live-media removed; libpulse and libvdpau so that the outputs be availabe --loonyphoenix
  14. optdepends=('libvdpau: for vdpau output'
  15.             'pulseaudio: for pulse output') #I hope I handled this correctly. I have no idea if mplayer built with libpulse and libvdpau will be able to load without them in the system
  16. backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
  17. provides=('mplayer')
  18. conflicts=('mplayer')
  19. source=('mplayer.desktop')
  20. md5sums=('af6ba58cc34322bf12e46e8d1d42d75f')
  21.  
  22. _gitroot="http://git.mplayer2.org/mplayer2/"
  23. _gitname="mplayer2"
  24.  
  25. build() {
  26.  
  27.   # Custom CFLAGS break the mplayer build
  28.   unset CFLAGS
  29.   unset LDFLAGS
  30.  
  31.   cd "${srcdir}"
  32.   if [[ -d "${_gitname}" ]]; then
  33.     cd "${_gitname}"
  34.     git pull
  35.   else
  36.     git clone "${_gitroot}" "${_gitname}" && cd "${_gitname}"
  37.   fi
  38.  
  39.   cd "${srcdir}"
  40.   rm -rf "${_gitname}-build"
  41.   cp -r "${_gitname}" "${_gitname}-build"
  42.   cd "${_gitname}-build"
  43.  
  44.   ./configure --prefix=/usr \
  45.     --disable-fribidi \
  46.     --language=all \
  47.     --confdir=/etc/mplayer
  48.  
  49. #  Removed:
  50. #    --disable-libdv \
  51. #    --enable-xvmc \
  52. #  I think autodetection should take care of that --loonyphoenix
  53.  
  54.   msg "Starting make..."
  55.  
  56.   make
  57. }
  58.  
  59. package() {
  60.   cd "${srcdir}/${_gitname}-build"
  61.  
  62.   make DESTDIR="${pkgdir}" install
  63.  
  64.   install -m644 etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
  65.   install -d -m755 "${pkgdir}/usr/share/mplayer"
  66.   ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
  67.  
  68.   # there is a desktop file where the xpm is, but we don't want that
  69.   install -Dm644 "${srcdir}/mplayer.desktop" "${pkgdir}/usr/share/applications/mplayer.desktop"
  70.   install -Dm644 "${srcdir}/${_gitname}/etc/mplayer.xpm" "${pkgdir}/usr/share/pixmaps/mplayer.xpm"
  71. }