# Maintainer: AshtonBRSC <michael@ashtonbrsc.co.uk>
# Contributor: pluckypigeon <pluckypigeon@ArchForums.com>
pkgname=get_iplayer
pkgver=20110109
pkgrel=1
pkgdesc="Allows you to download or stream any iPlayer programme from the BBC in H.264 (Quicktime/mp4) format, any radio programmes in MP3 or RealAudio format"
arch=('any')
url="http://git.infradead.org/get_iplayer.git"
license=('GPL3')
depends=('perl-libwww' 'perl-html-parser' 'perl-www-mechanize')
optdepends=('rtmpdump' 'flvstreamer')
makedepends=('git')
conflicts=('get-iplayer', 'get_iplayer')
backup=(etc/get_iplayer/options)
provides=('get_iplayer')
source=('options')
md5sums=('966cf991f9c106da28940b45c37c0b11')
_gitroot="git://git.infradead.org/get_iplayer.git"
_gitname="get_iplayer"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
}
package() {
cd "$srcdir/$_gitname"
install -m755 -D get_iplayer $pkgdir/usr/bin/get_iplayer
install -m644 -D README.txt $pkgdir/usr/share/doc/get_iplayer/README.txt
install -m644 -D $srcdir/options $pkgdir/etc/get_iplayer/options
install -m755 -d $pkgdir/usr/share/get_iplayer/plugins
install -m644 plugins/*.plugin $pkgdir/usr/share/get_iplayer/plugins/
install -m755 plugins/plugin.template $pkgdir/usr/share/get_iplayer/plugins/
}