pkgname=sabnzbd
pkgver=0.5.2
pkgrel=1
pkgdesc="A web-interface based binary newsgrabber with NZB file support"
arch=(i686 x86_64)
url="http://www.sabnzbd.org/"
license=('GPL')
depends=('par2cmdline' 'python' 'python-cheetah' 'python-feedparser' 'python-yenc' 'pyopenssl' 'unrar' 'unzip' 'sqlite3' 'curl')
install=sabnzbd.install
backup=('/etc/conf.d/sabnzbd' '/opt/sabnzbd/sabnzbd.ini')
source=("http://downloads.sourceforge.net/sabnzbdplus/SABnzbd-$pkgver-src.tar.gz" sabnzbd sabnzbd.init sabnzbd.confd)
md5sums=('3ffed9e6680e628a3c3b2cc6cbc50188'
'f45907d98a19052eaeb7ad98ff13b16d'
'ceaa5363cdc37e264a829af65adde36b'
'1b0b374905d1ae3cb81cd16de29a972e')
build() {
mkdir -p $startdir/pkg/opt/sabnzbd
mv -v $startdir/src/SABnzbd-$pkgver/* $startdir/pkg/opt/sabnzbd/
find $startdir/pkg/opt/sabnzbd -type d -exec chmod 755 {} \;
find $startdir/pkg/opt/sabnzbd -type f -exec chmod 644 {} \;
chmod 755 $startdir/pkg/opt/sabnzbd/SABnzbd.py
chmod 755 $startdir/pkg/opt/sabnzbd/Sample-PostProc.sh
install -D -m755 $startdir/sabnzbd $startdir/pkg/usr/bin/sabnzbd
install -D -m755 $startdir/sabnzbd.init $startdir/pkg/etc/rc.d/sabnzbd
install -D -m644 $startdir/sabnzbd.confd $startdir/pkg/etc/conf.d/sabnzbd
}