summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD
blob: 1089c4c859f0f39a597d248433c45dd16537cdfa (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
pkgname=mythtv-svn
pkgver=19974
pkgrel=1
pkgdesc="A personal video recorder for Linux"
url="http://www.mythtv.org"
license="GPL"
depends=('lame' 'libmysqlclient' 'alsa-lib'  'wget' 'qt' 'x-server' 'freetype2' 'libmpeg2' 'libxml2' 'libraw1394' 'lirc' 'perl-date-manip' 'libavc1394' 'libdc1394' 'libiec61883')
makedepends=('subversion')
conflicts=(mythtv)
replaces=()
backup=()
options=(!strip)
MAKEFLAGS="-j6"
install='mythtv.install'

patchs=('svn_main_menu_popup.patch' 'smolt_jump.patch' 'DeviceReadBuffer-polltimeout.2.patch' 'mpegrecorder-hdpvr-v2a.patch' 'hdpvr-livetv.patch')
source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` )
arch=('i686')
md5sums=()

_svntrunk=http://cvs.mythtv.org/svn/trunk/mythtv
_svnmod=mythtv

build() {

	svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
#	svn co $_svntrunk --config-dir ./ $_svnmod

	cd $startdir/src/mythtv

	echo "--------------------------applying patches----------------------------------------------------"
	for i in `echo ${patchs[@]:0} `
	do
		echo applying $i
		echo "-----------------------------"
		patch -Np0  -i ${startdir}/src/$i  #|| return 1
	done
	echo "--------------------------done applying patches-----------------------------------------------"

	sed -i -e "s/\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`/$pkgver/" version.pro

	[ "$CARCH" = "i686"   ] && ARCH="i686"
	[ "$CARCH" = "x86_64" ] && ARCH="x86-64"

	# configure
	./configure --prefix=/usr --cpu=${ARCH} \
	--enable-vdpau --enable-xvmc --enable-xvmc-pro \
	--enable-opengl-vsync --enable-libfaad --enable-dvb --enable-firewire \
	--compile-type=release --with-bindings=perl,python \
	--enable-audio-alsa --disable-audio-jack --disable-audio-arts || return 1

	# build and install
	. /etc/profile
	make || return 1
	make INSTALL_ROOT=$startdir/pkg install || return 1
    
	# install db schema, scripts and docs
	install -m0644 database/mc.sql $startdir/pkg/usr/share/mythtv/ || return 1
	install -D -m0755 ../mythbackend $startdir/pkg/etc/rc.d/mythbackend || return 1
	cp -r docs $startdir/pkg/usr/share/mythtv/ || return 1
	# cp ../QUICKSTART.archlinux $startdir/pkg/usr/share/mythtv/ || return 1

	# install contrib
	mkdir -p $startdir/pkg/usr/share/mythtv/contrib || return 1
	install -m0755 contrib/* $startdir/pkg/usr/share/mythtv/contrib

	# patch the xml LinHES style
	cp -r $startdir/menu-xml/*.xml $startdir/pkg/usr/share/mythtv/themes/defaultmenu
	cd $startdir/pkg/usr/share/mythtv/themes/defaultmenu
	patch -p0 < $startdir/menu-xml/mainmenu.xml.patch
	patch -p0 < $startdir/menu-xml/optical_menu.xml.patch
	patch -p0 < $startdir/menu-xml/library.xml.patch
	patch -p0 < $startdir/menu-xml/util_menu.xml.patch

	# make log dir
	mkdir -p $startdir/pkg/var/log/mythtv
	chown 1000.1000 $startdir/pkg/var/log/mythtv

}