summaryrefslogtreecommitdiffstats
path: root/mplayer/Pkgfile
blob: 4df957df0e9cfda9be5bc0014825a5c942b64176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Description: Lecteur/Encodeur Multimedia avec support VAAPI.
# URL: http://www.mplayerhq.hu/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: alsa-lib, gtk, yasm, faad2, x264, libcaca, speex, libmp4v2, xvid, amrnb, amrwb, libmpcdec, libdv, libmad, libpng, libmng, lzo, lame, faac, giflib,libogg, libcdio, esound, nas, libdvdcss, libdvdnav, libdvdread, libtheora, mplayer-all-codecs, cdparanoia, xorg-libxinerama, xorg-libxrandr, xorg-libxi, xorg-libxcursor, vdpau-video, desktop-file-utils
# Run on: alsa-lib,gtk,yasm,faad2,x264,libcaca,speex,libmp4v2,xvid,amrnb,amrwb,libmpcdec,libdv,libmad,libpng,libmng,lzo,lame,faac,giflib,libogg,libcdio,esound,nas,libdvdcss,libdvdnav,libdvdread,libtheora,mplayer-all-codecs,cdparanoia,xorg-libxinerama,xorg-libxrandr,xorg-libxi,xorg-libxcursor,vdpau-video,desktop-file-utils

name=mplayer
version=34357
release=1
source=(http://pkgbuild.com/~foutrelis/mplayer-vaapi-$version.tar.xz
	http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
	http://www.mplayerhq.hu/MPlayer/skins/Blue-1.8.tar.bz2
	http://nutyx.meticul.eu/files/patchs/$name/mplayer.conf
	mplayer.desktop
	mplayer.png)

build() {
	install -d -m755 $PKG/usr/share/mplayer/skins
	mv Blue $PKG/usr/share/mplayer/skins/default
	install -d -m755 $PKG/usr/share/mplayer
	mv font-arial-iso-8859-1 $PKG/usr/share/mplayer/font
	mkdir -p $PKG/etc/mplayer
	mv mplayer.conf $PKG/etc/mplayer/
	cd $name-vaapi-$version

	CFLAGS= ./configure --prefix=/usr \
		--enable-runtime-cpudetection \
		--disable-gui \
		--disable-arts \
		--disable-liblzo \
		--disable-speex \
		--disable-openal \
		--disable-libdv \
		--disable-musepack \
		--disable-esd \
		--disable-mga \
		--disable-ass-internal \
		--enable-xvmc \
		--enable-vdpau \
		--enable-vaapi \
		--language=all \
		--confdir=/etc/mplayer \
		--codecsdir=/usr/lib/codec

	[[ $CARCH == i686 ]] && sed -i 's|-march=i486|-march=i686|g' config.mak
	make -j1 DESTDIR=$PKG install-mplayer install-mplayer-man
	install -Dm644 etc/{codecs.conf,input.conf,example.conf} $PKG/etc/mplayer/

	# Fonts	
	install -dm755 $PKG/usr/share/mplayer/
	ln -s /usr/share/fonts/TTF/DejaVuSans.ttf $PKG/usr/share/mplayer/subfont.ttf
	cd $PKG/usr/share/mplayer/font
	for i in font-arial-14-iso-8859-1/*; do
		ln -s $i
	done

	cd $SRC
	install -Dm644 mplayer.desktop $PKG/usr/share/applications/mplayer.desktop
	install -Dm644 mplayer.png $PKG/usr/share/pixmaps/mplayer.png
	chown -R root:root $PKG
}