public
Created

  • Download Gist
PKGBUILD
Shell
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
# Maintainer: Gordin <9ordin @t gmail dot com>
# Contributor: dryes <joswiseman@gmail>
 
pkgname='sabnzbd-develop-git'
pkgver=20130207
pkgrel=1
pkgdesc='A web-interface based binary newsgrabber with NZB file support. develop branch'
arch=('any')
url='http://www.sabnzbd.org/'
license=('GPL')
depends=('par2cmdline' 'python2' 'python2-cheetah' 'python2-feedparser' 'python2-yenc' 'python2-pyopenssl' 'python2-gntp' 'unrar' 'unzip' 'zip' 'sqlite3' 'curl')
makedepends=('git')
backup=('etc/conf.d/sabnzbd')
install='sabnzbd.install'
conflicts=('sabnzbd' 'sabnzbd-bzr' 'sabnzbd-git')
provides=('sabnzbd')
replaces=('sabnzbd-bzr')
source=('sabnzbd.sh' 'sabnzbd.init' 'sabnzbd.confd')
md5sums=('0e90eab9ea5d80de91e2af41e84eb4cc' '7bd776f2c369026bb47e3d95982a0501' 'bc1723a2dd17d792785e1f6009b35751')
 
_gitroot="https://github.com/sabnzbd/sabnzbd.git"
_gitname="sabnzbd"
_branch="develop"
 
build() {
cd "${srcdir}"
msg "Connecting to GIT server...."
 
if [ -d ${_gitname} ] ; then
cd ${_gitname} && git pull origin
cd "$srcdir"
msg "The local files are updated."
else
git clone ${_gitroot} ${_gitname} -b ${_branch} --depth=1
fi
 
msg "GIT checkout done or server timeout"
 
cd "$_gitname"
sed -i "s/system('python /system('python2 /" package.py
sed -i "/win\//d" package.py
python2 ./package.py source
}
 
package() {
mkdir -p "${pkgdir}/opt"
cp -r "${srcdir}/sabnzbd/srcdist" "${pkgdir}/opt"
mv "${pkgdir}/opt/srcdist" "${pkgdir}/opt/sabnzbd"
 
install -D -m755 "${srcdir}/sabnzbd.sh" "${pkgdir}/usr/bin/sabnzbd"
install -D -m755 "${srcdir}/sabnzbd.init" "${pkgdir}/etc/rc.d/sabnzbd"
install -D -m644 "${srcdir}/sabnzbd.confd" "${pkgdir}/etc/conf.d/sabnzbd"
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.