core/mplayer/PKGBUILD

91 lines
3.2 KiB
Bash

#
# Platform packages of Chakra Project, part of chakra-project.org
#
# Contributor: abveritas@chakra-project.org
# Maintainer: Bruce Liu <rainman59118@gmail.com>
pkgbase=mplayer
pkgname=('mplayer' 'mencoder')
pkgver=36505
pkgrel=5
arch=('x86_64')
makedepends=('subversion' 'libxxf86vm' 'libmad' 'libxinerama' 'sdl' 'lame' 'libtheora'
'xvidcore' 'libmng' 'libxss' 'libgl' 'smbclient' 'aalib' 'jack' 'libcaca'
'x264' 'faac' 'faad2' 'lirc-utils' 'libxvmc' 'enca' 'libvdpau' 'opencore-amr'
'libdca' 'a52dec' 'schroedinger' 'libvpx' 'libpulse' 'fribidi' 'unzip' 'mesa'
'live-media' 'yasm' 'git' 'fontconfig' 'mpg123' 'ladspa' 'libass' 'libbluray'
'libcdio' 'opus')
license=('GPL2')
url="http://www.mplayerhq.hu/"
categories=('multimedia')
screenshot=("http://www.mplayerhq.hu/images/screenshots/gui-preview-01.jpg")
install=mplayer.install
source=("${pkgname}::svn://svn.mplayerhq.hu/mplayer/trunk#revision=${pkgver}"
"http://ffmpeg.org/releases/ffmpeg-2.1.tar.bz2"
"mplayer.desktop"
"mplayer.png")
md5sums=('SKIP'
'4ec1cedd4c7753512462f70b347c338a'
'c0d6ef795cf6de48e3b87ff7c23f0319'
'd00874ccc644b7f43d6ef1c942fcef28')
prepare() {
cd ${pkgname}
mv ../ffmpeg-2.1 ffmpeg
}
build() {
cd ${srcdir}/${pkgname}
# Custom CFLAGS break the mplayer build
unset CFLAGS LDFLAGS
./configure \
--confdir=/etc/mplayer \
--disable-dvdread-internal \
--enable-runtime-cpudetection \
--language=all \
--prefix=/usr
make
}
package_mplayer() {
pkgdesc="A movie player for linux"
install=mplayer.install
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
depends=('desktop-file-utils' 'ttf-dejavu' 'enca' 'libxss' 'a52dec' 'libvpx'
'lirc-utils' 'x264' 'libmng' 'libdca' 'aalib' 'lame' 'fontconfig'
'libgl' 'libxinerama' 'libvdpau' 'libpulse' 'smbclient' 'xvidcore'
'opencore-amr' 'jack' 'libmad' 'sdl' 'libtheora' 'libcaca'
'fribidi' 'libjpeg' 'faac' 'faad2' 'libxvmc' 'schroedinger' 'mpg123'
'libass' 'libxxf86vm' 'libbluray' 'libcdio' 'opus')
cd ${srcdir}/${pkgname}
make DESTDIR=${pkgdir} install-mplayer install-mplayer-man
install -Dm644 etc/{codecs.conf,input.conf,example.conf} ${pkgdir}/etc/mplayer/
install -dm755 ${pkgdir}/usr/share/mplayer/
ln -s /usr/share/fonts/TTF/DejaVuSans.ttf ${pkgdir}/usr/share/mplayer/subfont.ttf
rm -rf ${pkgdir}/usr/share/mplayer/font
# Desktop Integration.
install -Dm644 ${srcdir}/mplayer.desktop ${pkgdir}/usr/share/applications/mplayer.desktop
install -Dm644 ${srcdir}/mplayer.png ${pkgdir}/usr/share/pixmaps/mplayer.png
}
package_mencoder() {
pkgdesc="Free command line video decoding, encoding and filtering tool"
depends=('enca' 'a52dec' 'libvpx' 'x264' 'libmng' 'libdca' 'bzip2' 'lame'
'alsa-lib' 'fontconfig' 'giflib' 'libpng' 'smbclient' 'xvidcore'
'opencore-amr' 'libmad' 'libtheora' 'fribidi' 'libjpeg' 'faac' 'faad2'
'schroedinger' 'mpg123' 'libass' 'libbluray' 'libcdio'
'libvorbis' 'opus')
cd $pkgbase
make DESTDIR="$pkgdir" install-mencoder install-mencoder-man
find "$pkgdir/usr/share/man" -name mplayer.1 -exec rename mplayer.1 mencoder.1 {} +
}