Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

mplayer2-git PKGBUILD

By: a guest on Jun 27th, 2012  |  syntax: Bash  |  size: 2.07 KB  |  views: 46  |  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. pkgname=mplayer2-git
  2. pkgver=20120627
  3. pkgrel=1
  4. pkgdesc="A movie player for linux (uses statically linked libav; git version)"
  5. arch=('i686' 'x86_64')
  6. license=('GPL')
  7. url="http://www.mplayer2.org/"
  8. depends=('a52dec' 'aalib' 'cdparanoia' 'desktop-file-utils' 'enca' 'faad2' 'ffmpeg' 'fontconfig'
  9.          'freetype2' 'jack' 'ladspa' 'lame' 'libass' 'libbluray' 'libcaca' 'libcdio' 'libdca' 'libdvdcss'
  10.          'libdvdnav' 'libdvdread' 'libgl' 'libjpeg' 'libmad' 'libpulse' 'libtheora' 'libvdpau'
  11.          'libxinerama' 'libxss' 'libxv' 'libxxf86dga' 'libxxf86vm' 'lirc-utils' 'mpg123' 'ncurses' 'sdl' 'ttf-dejavu')
  12. makedepends=('git' 'mesa' 'unzip' 'yasm')
  13. backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
  14. provides=('mplayer' 'mplayer2')
  15. conflicts=('mplayer')
  16. options=(!emptydirs)
  17. install=mplayer2.install
  18.  
  19. _gitroot="git://git.mplayer2.org/mplayer2-build.git"
  20. _gitname="mplayer2"
  21.  
  22. build() {
  23.   cd "${srcdir}"
  24.   if [[ -d "${_gitname}" ]]; then
  25.     cd "${_gitname}"
  26.     git pull
  27.   else
  28.     git clone "${_gitroot}" "${_gitname}" && cd "${_gitname}"
  29.   fi
  30.  
  31.   ./init --shallow
  32.   cd "${srcdir}"
  33.   rm -rf "${_gitname}-build"
  34.   cp -r "${_gitname}" "${_gitname}-build"
  35.   cd "${_gitname}-build/mplayer"
  36.  
  37.   sed 's/gmplayer/mplayer/g' -i etc/mplayer.desktop
  38.  
  39.     ./configure --prefix=/usr --confdir=/etc/mplayer \
  40.                 --enable-translation --language=all \
  41.                 --enable-runtime-cpudetection \
  42.                 --enable-joystick \
  43.                 --disable-speex \
  44.                 --disable-openal \
  45.                 --disable-libdv \
  46.                 --disable-musepack \
  47.                 --disable-mga
  48.   make
  49. }
  50.  
  51. package() {
  52.   cd "${srcdir}/${_gitname}-build/mplayer"
  53.  
  54.   make DESTDIR="${pkgdir}" install
  55.  
  56.   install -Dm644 etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
  57.   install -dm755 "${pkgdir}/usr/share/mplayer"
  58.   ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
  59.  
  60.   install -dm755 "${pkgdir}"/usr/share/applications/
  61.   install -m 644 etc/mplayer.desktop "${pkgdir}"/usr/share/applications/
  62. }