Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Matej Lach <matej.lach@gmail.com>
- # Contributor: cantabile <cantabile dot desu at gmail dot com>
- # Contributor: extcake < extcake@gmail.com >
- # Based on the mplayer-mt-oss-git package
- # this package used to be called mplayer-mt-git, before upstream decided
- # to rename the project.
- pkgname=mplayer2-git
- pkgver=20120310
- pkgrel=1
- pkgdesc="A movie player for linux (uses statically linked libav; git version)"
- arch=('i686' 'x86_64')
- license=('GPL')
- url="http://www.mplayer2.org/"
- depends=('libgl' 'libxv' 'libxss' 'fribidi' 'libbluray' 'libxxf86dga' 'sdl' 'desktop-file-utils' 'freetype2')
- makedepends=('git' 'live-media' 'mesa' 'python2' 'unzip' 'videoproto' 'yasm')
- backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
- provides=('mplayer' 'mplayer2')
- conflicts=('mplayer')
- options=(!emptydirs)
- install=mplayer2.install
- source=('mplayer2.install' 'mplayer.desktop'
- 'live-media.patch::https://projects.archlinux.org/svntogit/packages.git/plain/trunk/live-media.patch?h=packages/mplayer')
- md5sums=('cbc234e5e789e30c624741173992a225'
- 'af6ba58cc34322bf12e46e8d1d42d75f'
- '5488b165d1cd00870d6559efc42d7a96')
- _gitroot="git://git.mplayer2.org/mplayer2-build.git"
- _gitname="mplayer2"
- build() {
- # Custom CFLAGS break the mplayer build
- # unset CFLAGS
- # unset LDFLAGS
- cd "${srcdir}"
- if [[ -d "${_gitname}" ]]; then
- cd "${_gitname}"
- git pull
- else
- git clone "${_gitroot}" "${_gitname}" && cd "${_gitname}"
- fi
- echo "
- --prefix=/usr
- --language=all
- --confdir=/etc/mplayer
- " > mplayer_options
- # for i in $(grep -r -l '/usr/bin/env python$' . 2>/dev/null); do sed -i 's:/usr/bin/env python$:&2:' "$i"; done
- # for the paranoid, the following is supposed to handle filenames
- # containing \n and other such abominations (thanks to grawity and others
- # from irc)
- grep -r -lZ '/usr/bin/env python[^23]*' . 2>/dev/null | while read -rd '' file; do sed -i '1s:\<python\>:&2:' "$file"; done
- ./init --shallow
- cd "${srcdir}"
- rm -rf "${_gitname}-build"
- cp -r "${_gitname}" "${_gitname}-build"
- cd "${_gitname}-build"
- (cd "mplayer" && patch -Np0 -i "${srcdir}/live-media.patch")
- msg "Starting make..."
- make
- }
- package() {
- cd "${srcdir}/${_gitname}-build"
- make DESTDIR="${pkgdir}" install
- install -m644 mplayer/etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
- install -d -m755 "${pkgdir}/usr/share/mplayer"
- ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
- # there is a desktop file where the xpm is, but we don't want that
- install -Dm644 "${srcdir}/mplayer.desktop" "${pkgdir}/usr/share/applications/mplayer.desktop"
- install -Dm644 "${srcdir}/${_gitname}/mplayer/etc/mplayer.xpm" "${pkgdir}/usr/share/pixmaps/mplayer.xpm"
- }
Add Comment
Please, Sign In to add comment