mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 02:44:37 +08:00
149 lines
5.2 KiB
Bash
149 lines
5.2 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=mplayer
|
|
pkgver=34852
|
|
pkgrel=1
|
|
pkgdesc="Multimedia player."
|
|
arch=('i686' 'x86_64')
|
|
depends=('bzip2' 'gcc-libs' 'glibc' 'libxext' 'ncurses' 'orc' 'ttf-dejavu' 'zlib')
|
|
makedepends=('a52dec' 'aalib' 'alsa-lib' 'cdparanoia' 'directfb' 'enca' 'faac' 'faad2'
|
|
'fontconfig' 'freetype2' 'fribidi' 'giflib' 'gsm' 'jack' 'ladspa' 'lame'
|
|
'libass' 'libbluray' 'libbs2b' 'libcaca' 'libcdio' 'libdca' 'libdv'
|
|
'libdvdnav'
|
|
'libdvdread' 'libgl' 'libjpeg' 'libmad' 'libmng' 'libmpeg2' 'libogg'
|
|
'libpng' 'libpulse' 'libtheora' 'libvdpau' 'libvpx'
|
|
'libx11' 'libxinerama' 'libxss' 'libxv' 'libxxf86dga' 'libxxf86vm' 'lirc-utils'
|
|
'live-media>=2010.01.13' 'lzo2' 'mesa' 'mpg123' 'nas' 'openal' 'opencore-amr' 'openjpeg'
|
|
'rtmpdump' 'schroedinger' 'sdl' 'smbclient' 'speex' 'toolame'
|
|
'unzip' 'vstream-client'
|
|
'x264' 'xvidcore' 'yasm')
|
|
optdepends=(
|
|
'a52dec: ATSC A/52 streams decoding support.'
|
|
'aalib: AAlib video output support.'
|
|
'alsa-lib: ALSA audio output support.'
|
|
'cdparanoia: Compact Disc Digital Audio extraction.'
|
|
'directfb: DirectFB video output support.'
|
|
'enca: ENCA support.'
|
|
'faac: AAC audio encoding support.'
|
|
'faad2: AAC audio decoding support.'
|
|
'fontconfig: FontConfig font lookup.'
|
|
'freetype2: Freetype 2 font rendering.'
|
|
'fribidi: FriBiDi support.'
|
|
'giflib: GIF support.'
|
|
'gsm: libgsm support.'
|
|
'jack: JACK audio output support.'
|
|
'ladspa: LADSPA plugin support.'
|
|
'lame: MP3 encoding support.'
|
|
'libass: SSA/ASS subtitle support.'
|
|
'libbluray: Blu-ray support.'
|
|
'libbs2b: libbs2b audio filter support.'
|
|
'libcaca: CACA video output support.'
|
|
'libcdio: libcdio support.'
|
|
'libdca: libdca support.'
|
|
'libdv: DV video support.'
|
|
'libdvdnav: DVD navigation support.'
|
|
'libdvdread: DVD support.'
|
|
'libgl: OpenGL video output support.'
|
|
'libjpeg: JPEG input/output support.'
|
|
'libmad: MPEG audio support.'
|
|
'libmng: MNG input/output support.'
|
|
'libmpeg2: MPEG-1 and MPEG-2 video streams decoding support.'
|
|
'libogg: OGG support.'
|
|
'libpng: PNG input/output support.'
|
|
'libpulse: Pulse audio output support.'
|
|
'libtheora: OggTheora support.'
|
|
'libvdpau: VDPAU acceleration support.'
|
|
'libvpx: VP8 support.'
|
|
'libx11: X11 video output support.'
|
|
'libxinerama: Xinerama support.'
|
|
'libxss: support for screensaver disabling.'
|
|
'libxv: XV video output support.'
|
|
'libxxf86dga: DGA video output support.'
|
|
'libxxf86vm: xf68 video mode support.'
|
|
'lirc-utils: Remote control.'
|
|
'lzo2: liblzo support.'
|
|
'mpg123: MP3 decoding support.'
|
|
'nas: NAS audio output support.'
|
|
'openal: OpenAL audio output support.'
|
|
'opencore-amr: AMR speech codec support.'
|
|
'openjpeg: OpenJPEG (JPEG 2000) input/output support.'
|
|
'rtmpdump: RTMPDump Streaming Media.'
|
|
'schroedinger: Dirac support.'
|
|
'sdl: SDL video output support.'
|
|
'smbclient: Samba (SMB) input.'
|
|
'speex: Speex support.'
|
|
'toolame: MPEG layer 2 encoding support.'
|
|
'vstream-client: TiVo vstream client support.'
|
|
'x264: x264 support.'
|
|
'xvidcore: XVID support.'
|
|
)
|
|
license=('GPL2')
|
|
url="http://www.mplayerhq.hu/"
|
|
categories=('multimedia')
|
|
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
|
|
install=mplayer.install
|
|
source=(http://chakra-linux.org/sources/${pkgname}/${pkgname}-${pkgver}.tar.xz mplayer.desktop mplayer.png)
|
|
md5sums=('2cd92ef7c39369eca94f915e42faa64a'
|
|
'c0d6ef795cf6de48e3b87ff7c23f0319'
|
|
'd00874ccc644b7f43d6ef1c942fcef28')
|
|
|
|
# create tarball: source PKGBUILD && mksource
|
|
|
|
mksource() {
|
|
rm -vRf ${pkgname}
|
|
echo "checkout mplayer"
|
|
_pkgver=`svn info svn://svn.mplayerhq.hu/mplayer/trunk | grep Revision: | cut -d' ' -f2`
|
|
svn co svn://svn.mplayerhq.hu/mplayer/trunk --config-dir ./ ${pkgname} || return 1
|
|
cd ${pkgname}
|
|
echo "checkout ffmpeg"
|
|
git clone git://git.videolan.org/ffmpeg.git ffmpeg
|
|
echo "clean checkout"
|
|
rm -vRf ffmpeg/.git
|
|
find . -name ".svn" -exec rm -rf {} \;
|
|
cd ..
|
|
pushd ${pkgname}
|
|
popd
|
|
echo "pack checkout"
|
|
tar -cvJf ${pkgname}-${_pkgver}.tar.xz ${pkgname}/*
|
|
md5sum ${pkgname}-${_pkgver}.tar.xz
|
|
echo "change pkgver to ${_pkgver}"
|
|
}
|
|
|
|
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
|
|
|
|
[ "$CARCH" = "i686" ] && sed 's|-march=i486|-march=i686|g' -i config.mak
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/${pkgname}
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
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
|
|
}
|