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 live-media-2012.02.29

By: a guest on Mar 10th, 2012  |  syntax: Bash  |  size: 2.77 KB  |  views: 224  |  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:  Matej Lach <matej.lach@gmail.com>
  2. # Contributor: cantabile <cantabile dot desu at gmail dot com>
  3. # Contributor: extcake < extcake@gmail.com >
  4. # Based on the mplayer-mt-oss-git package
  5.  
  6. # this package used to be called mplayer-mt-git, before upstream decided
  7. # to rename the project.
  8. pkgname=mplayer2-git
  9. pkgver=20120310
  10. pkgrel=1
  11. pkgdesc="A movie player for linux (uses statically linked libav; git version)"
  12. arch=('i686' 'x86_64')
  13. license=('GPL')
  14. url="http://www.mplayer2.org/"
  15. depends=('libgl' 'libxv' 'libxss' 'fribidi' 'libbluray' 'libxxf86dga' 'sdl' 'desktop-file-utils' 'freetype2')
  16. makedepends=('git' 'live-media' 'mesa' 'python2' 'unzip' 'videoproto' 'yasm')
  17. backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
  18. provides=('mplayer' 'mplayer2')
  19. conflicts=('mplayer')
  20. options=(!emptydirs)
  21. install=mplayer2.install
  22. source=('mplayer2.install' 'mplayer.desktop'
  23.         'live-media.patch::https://projects.archlinux.org/svntogit/packages.git/plain/trunk/live-media.patch?h=packages/mplayer')
  24. md5sums=('cbc234e5e789e30c624741173992a225'
  25.          'af6ba58cc34322bf12e46e8d1d42d75f'
  26.          '5488b165d1cd00870d6559efc42d7a96')
  27.  
  28. _gitroot="git://git.mplayer2.org/mplayer2-build.git"
  29. _gitname="mplayer2"
  30.  
  31. build() {
  32.   # Custom CFLAGS break the mplayer build
  33. #  unset CFLAGS
  34. #  unset LDFLAGS
  35.  
  36.   cd "${srcdir}"
  37.   if [[ -d "${_gitname}" ]]; then
  38.     cd "${_gitname}"
  39.     git pull
  40.   else
  41.     git clone "${_gitroot}" "${_gitname}" && cd "${_gitname}"
  42.   fi
  43.  
  44.   echo "
  45. --prefix=/usr
  46. --language=all
  47. --confdir=/etc/mplayer
  48. " > mplayer_options
  49.  
  50. #  for i in $(grep -r -l '/usr/bin/env python$' . 2>/dev/null); do sed -i 's:/usr/bin/env python$:&2:' "$i"; done
  51. # for the paranoid, the following is supposed to handle filenames
  52. # containing \n and other such abominations (thanks to grawity and others
  53. # from irc)
  54.   grep -r -lZ '/usr/bin/env python[^23]*' . 2>/dev/null | while read -rd '' file; do sed -i '1s:\<python\>:&2:' "$file"; done
  55.   ./init --shallow
  56.   cd "${srcdir}"
  57.   rm -rf "${_gitname}-build"
  58.   cp -r "${_gitname}" "${_gitname}-build"
  59.   cd "${_gitname}-build"
  60.  
  61.   (cd "mplayer" && patch -Np0 -i "${srcdir}/live-media.patch")
  62.  
  63.   msg "Starting make..."
  64.  
  65.   make
  66. }
  67.  
  68. package() {
  69.   cd "${srcdir}/${_gitname}-build"
  70.  
  71.   make DESTDIR="${pkgdir}" install
  72.  
  73.   install -m644 mplayer/etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
  74.   install -d -m755 "${pkgdir}/usr/share/mplayer"
  75.   ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
  76.  
  77.   # there is a desktop file where the xpm is, but we don't want that
  78.   install -Dm644 "${srcdir}/mplayer.desktop" "${pkgdir}/usr/share/applications/mplayer.desktop"
  79.   install -Dm644 "${srcdir}/${_gitname}/mplayer/etc/mplayer.xpm" "${pkgdir}/usr/share/pixmaps/mplayer.xpm"
  80. }
clone this paste RAW Paste Data