updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / sabnzbd-develop-git / PKGBUILD
blob4f287438abfeed533a7de29ca4876f00ddc3c48a
1 # Maintainer: Gordin <9ordin @t gmail dot com>
2 # Contributor: dryes <joswiseman@gmail>
4 pkgname='sabnzbd-develop-git'
5 pkgver=20110930
6 pkgrel=1
7 pkgdesc='A web-interface based binary newsgrabber with NZB file support. develop branch'
8 arch=('any')
9 url='http://www.sabnzbd.org/'
10 license=('GPL')
11 depends=('par2cmdline' 'python2' 'python-cheetah' 'python2-feedparser' 'python2-yenc' 'python2-pyopenssl' 'python2-gntp' 'unrar' 'unzip' 'zip' 'sqlite3' 'curl')
12 makedepends=('git')
13 backup=('etc/conf.d/sabnzbd')
14 install=('sabnzbd.install')
15 conflicts=('sabnzbd' 'sabnzbd-bzr' 'sabnzbd-git')
16 provides=('sabnzbd')
17 replaces=('sabnzbd-bzr')
18 source=('sabnzbd.sh' 'sabnzbd.init' 'sabnzbd.confd')
19 md5sums=('0e90eab9ea5d80de91e2af41e84eb4cc' '7bd776f2c369026bb47e3d95982a0501' 'bc1723a2dd17d792785e1f6009b35751')
21 _gitroot="https://github.com/sabnzbd/sabnzbd.git"
22 _gitname="sabnzbd"
23 _branch="develop"
25 build() {
26   cd "${srcdir}"
27   msg "Connecting to GIT server...."
29   if [ -d ${_gitname} ] ; then
30     cd ${_gitname} && git pull origin
31     msg "The local files are updated."
32   else
33     git clone ${_gitroot} ${_gitname} -b ${_branch} --depth=1
34   fi
36   msg "GIT checkout done or server timeout"
38   cd sabnzbd
39   sed -i "s/system('python /system('python2 /" package.py
40   sed -i "/win\//d"  package.py
41   python2 ./package.py source
44 package() {
45   mkdir -p "${pkgdir}/opt"
46   cp -r "${srcdir}/sabnzbd/srcdist" "${pkgdir}/opt"
47   mv "${pkgdir}/opt/srcdist" "${pkgdir}/opt/sabnzbd"
49   install -D -m755 "${srcdir}/sabnzbd.sh" "${pkgdir}/usr/bin/sabnzbd"
50   install -D -m755 "${srcdir}/sabnzbd.init" "${pkgdir}/etc/rc.d/sabnzbd"
51   install -D -m644 "${srcdir}/sabnzbd.confd" "${pkgdir}/etc/conf.d/sabnzbd"