1 # Contributor: Benjamin Bukowski <benjamin.bukowski@googlemail.com>
5 pkgdesc="PS3 Media Server is a DLNA compliant Upnp Media Server for the PS3, written in Java, with the purpose of streaming or transcoding any kind of media files, with minimum configuration."
7 url="http://code.google.com/p/ps3mediaserver/"
9 depends=('mplayer' 'ffmpeg' 'java-runtime' 'tsmuxer' 'libmediainfo')
10 makedepends=('subversion' 'apache-ant')
13 backup=('opt/pms/PMS.conf' 'opt/pms/WEB.conf')
14 install=$pkgname.install
15 source=('rc-pms' 'pms.desktop' 'pms.conf')
16 md5sums=('387ae6c96d63f1e6bade60c130c339ab'
17 'e909cfeb522c4f9d933a0eec40037d2f'
18 'a3dcdcde0c247405e4370adf1bc0f816')
20 _svntrunk=http://ps3mediaserver.googlecode.com/svn/trunk/
24 msg "Making sure Ant environmet is set.."
25 if [[ -z "$ANT_HOME" && -r /etc/profile.d/apache-ant.sh ]]; then
26 if [ -r /etc/profile.d/apache-ant.sh ]; then
27 source /etc/profile.d/apache-ant.sh
35 if [ -d $_svnmod/.svn ]; then
36 (cd $_svnmod && svn up -r $pkgver)
38 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
41 msg "SVN checkout done or server timeout"
44 rm -rf "$srcdir/$_svnmod-build"
45 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
46 cd "$srcdir/$_svnmod-build/ps3mediaserver"
50 install -dm755 $pkgdir/opt/pms \
52 $pkgdir/usr/share/pixmaps \
53 $pkgdir/usr/share/applications/ \
60 tar -xf *.tgz --exclude tsMuxeR* -C ./pms/ || return 1
63 find . -type d -exec install -dm755 $pkgdir/opt/pms/{} \;
64 find . -type f -exec install -Dm644 {} $pkgdir/opt/pms/{} \;
66 sed -i '2i PMS_HOME=/opt/pms\ncd $PMS_HOME' $pkgdir/opt/pms/PMS.sh
67 chmod +x $pkgdir/opt/pms/PMS.sh
68 ln -sf /opt/pms/PMS.sh $pkgdir/usr/bin/pms
70 touch $pkgdir/opt/pms/{PMS.conf,WEB.conf,debug.log} $pkgdir/var/log/pms.log
71 chmod 644 $pkgdir/opt/pms/{PMS.conf,WEB.conf,debug.log} $pkgdir/var/log/pms.log
73 install -Dm644 $srcdir/pms.conf $pkgdir/etc/conf.d/pms
74 install -Dm755 $srcdir/rc-pms $pkgdir/etc/rc.d/pms
75 install -Dm644 $srcdir/pms.desktop $pkgdir/usr/share/applications/
76 install -Dm644 $srcdir/$_svnmod-build/ps3mediaserver/resources/images/icon-32.png $pkgdir/usr/share/pixmaps/pms.png
78 ln -s /usr/bin/tsMuxeR $pkgdir/opt/pms/linux/tsMuxeR