PKGBUILDs/aur/couchpotato-git/PKGBUILD
Kevin Mihelich 6884cd78f1 aur updates
2014-10-15 01:51:14 +00:00

37 lines
910 B
Bash

# Maintainer: Ben Ruijl <benruyl at gmail>
pkgname=couchpotato-git
_gitname=CouchPotatoServer
pkgver=3862.1fb031f
pkgrel=1
pkgdesc="Automatic Movie Downloading via NZBs & Torrent"
arch=('any')
url="http://couchpota.to/"
license=('GPL3')
depends=('python2')
makedepends=('git')
install='couchpotato.install'
source=('git://github.com/RuudBurger/CouchPotatoServer.git' 'couchpotato.service')
md5sums=('SKIP' '82813cd00a17dd78f10756d71c7eb848')
pkgver() {
cd $_gitname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
prepare() {
cd $_gitname
# Use Python 2
find . -type f -exec sed -i -r \
-e 's|/usr/bin/python$|&2|g' \
-e 's|(/usr/bin/python2)\.4$|\1|g' \
{} +
}
package() {
mkdir -p "${pkgdir}/opt/"
cp -r "$srcdir/$_gitname" "${pkgdir}/opt/couchpotato"
install -Dm644 "${srcdir}/couchpotato.service" "${pkgdir}/usr/lib/systemd/system/couchpotato.service"
}