diff options
author | willemw12 | 2019-07-10 20:54:52 +0200 |
---|---|---|
committer | willemw12 | 2019-07-10 20:54:52 +0200 |
commit | 455d32ffe1473f3ceda5bd88ef042ba2edda8491 (patch) | |
tree | 0b56b5698a19811858f6bbdb1e349cd89ccda733 | |
parent | b794653d56d2de956c7948314b882cd9c018b015 (diff) | |
download | aur-455d32ffe1473f3ceda5bd88ef042ba2edda8491.tar.gz |
Update to Python3. Move pip installation to build().
Update build steps. Update makedepends (see Dockerfile).
Install .git folder. Chown only installed files.
Run service in virtualenv. Change service type from forking to simple.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | sickrage-git.install | 10 | ||||
-rw-r--r-- | sickrage.service | 7 |
4 files changed, 38 insertions, 54 deletions
@@ -1,29 +1,25 @@ pkgbase = sickrage-git pkgdesc = A PVR application that downloads and manages your TV shows. Echel0n fork of sickbeard, with tvrage, torrents and anime support. - pkgver = 9.4.53.r0.gccea132d4 + pkgver = 9.4.117.r0.g1db69f779 pkgrel = 1 - url = https://git.sickrage.ca/SiCKRAGE/sickrage + url = https://github.com/SiCKRAGETV/SickRage install = sickrage-git.install arch = any license = GPL3 makedepends = git - depends = python2-apscheduler - depends = python2-cheetah - depends = python2-mako - depends = python2-tornado - depends = python2-tzlocal - optdepends = python2-notify: desktop notifications - optdepends = python2-pyopenssl: enable SSL + makedepends = libxml2 + makedepends = libxslt + makedepends = python-virtualenv optdepends = unrar: RAR archives provides = sickrage conflicts = sickrage options = !strip - source = sickrage-git::git+http://git.sickrage.ca/SiCKRAGE/sickrage.git + source = sickrage-git::git+https://github.com/SiCKRAGETV/SickRage.git source = sickrage.service source = sickrage.sysusers source = sickrage.tmpfile md5sums = SKIP - md5sums = 09e42acd4948444989ecaa2aaceb5892 + md5sums = 1df007e4b5347e400622ae931a6aa7b6 md5sums = 6a7db7e14e74072d29e482b06b41dfa7 md5sums = f7a12df978d649da4e77d88e03f50252 @@ -1,69 +1,60 @@ # Maintainer: willemw <willemw12@gmail.com> # Contibutor: Justin Dray <justin@dray.be> +# Contibutor: B4SH-B00STER _pkgname=sickrage pkgname=$_pkgname-git -pkgver=9.4.53.r0.gccea132d4 +pkgver=9.4.117.r0.g1db69f779 pkgrel=1 pkgdesc="A PVR application that downloads and manages your TV shows. Echel0n fork of sickbeard, with tvrage, torrents and anime support." arch=('any') -url="https://git.sickrage.ca/SiCKRAGE/sickrage" +#url="https://git.sickrage.ca/SiCKRAGE/sickrage.git" +url="https://github.com/SiCKRAGETV/SickRage" license=('GPL3') -makedepends=('git') -depends=('python2-apscheduler' - 'python2-cheetah' - 'python2-mako' - 'python2-tornado' - 'python2-tzlocal') -# 'deluge: torrent client' -# 'qbittorrent: torrent client' -# 'rtorrent: torrent client' -# 'sabnzbd: NZB downloader' -# 'transmission-cli: torrent client' -optdepends=('python2-notify: desktop notifications' - 'python2-pyopenssl: enable SSL' - 'unrar: RAR archives') +makedepends=('git' 'libxml2' 'libxslt' 'python-virtualenv') +#depends=('deluge: supported torrent client' +# 'qbittorrent: supported torrent client' +# 'rtorrent: supported torrent client' +# 'sabnzbd: supported NZB downloader' +# 'transmission-cli: supported torrent client' +optdepends=('unrar: RAR archives') provides=($_pkgname) conflicts=($_pkgname) options=('!strip') install=$pkgname.install -#source=("$pkgname::git://github.com/SiCKRAGETV/SickRage.git" -source=("$pkgname::git+http://git.sickrage.ca/SiCKRAGE/sickrage.git" +#source=("$pkgname::git+https://git.sickrage.ca/SiCKRAGE/sickrage.git" +source=("$pkgname::git+https://github.com/SiCKRAGETV/SickRage.git" 'sickrage.service' 'sickrage.sysusers' 'sickrage.tmpfile') md5sums=('SKIP' - '09e42acd4948444989ecaa2aaceb5892' + '1df007e4b5347e400622ae931a6aa7b6' '6a7db7e14e74072d29e482b06b41dfa7' 'f7a12df978d649da4e77d88e03f50252') +export PIP_DEFAULT_TIMEOUT=60 + pkgver() { + #pip search $_pkgname | awk '$1 == "'$_pkgname'" { gsub("[()]", ""); print $2 ".r0" }' + cd $pkgname git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd $pkgname - python2 setup.py --quiet build + virtualenv . + #./bin/pip install --isolated -U pip setuptools + ./bin/pip install --isolated -r requirements.txt } -#check() { -# cd $pkgname -# python2 setup.py test -#} - package() { install -Dm644 sickrage.service "$pkgdir/usr/lib/systemd/system/sickrage.service" install -Dm644 sickrage.sysusers "$pkgdir/usr/lib/sysusers.d/sickrage.conf" install -Dm644 sickrage.tmpfile "$pkgdir/usr/lib/tmpfiles.d/sickrage.conf" - install -dm755 "$pkgdir"/opt/sickrage/{app,data} - - # The install type is "source": .git folder is not included - #cd $pkgname - #python2 setup.py install --prefix=/opt/sickrage/app --install-lib=/opt/sickrage/app --root="$pkgdir" --optimize=1 - cp -a $pkgname/* "$pkgdir/opt/sickrage/app/" - - warning "If the upgrade fails with \"error: failed to commit transaction (conflicting files)\", then uninstall first" + install -dm755 "$pkgdir"/opt/sickrage/data + # Note: including .git/ + cp -a $pkgname "$pkgdir/opt/sickrage/app" } diff --git a/sickrage-git.install b/sickrage-git.install index 107c9fcb3296..68e394ab246b 100644 --- a/sickrage-git.install +++ b/sickrage-git.install @@ -1,13 +1,13 @@ post_install() { systemd-sysusers sickrage.conf systemd-tmpfiles --create sickrage.conf - chown -R sickrage:sickrage /opt/sickrage - echo "==> Start and enable sickrage.service. Then visit http://localhost:8081/" -} + #chown -R sickrage:sickrage /opt/sickrage + chown sickrage:sickrage /opt/sickrage/{,data} + chown -R sickrage:sickrage /opt/sickrage/app -post_upgrade() { - post_install $1 + echo + echo "==> Start and enable sickrage.service. Then visit http://localhost:8081/" } pre_remove() { diff --git a/sickrage.service b/sickrage.service index 8062e597e578..28fd5e6a01e8 100644 --- a/sickrage.service +++ b/sickrage.service @@ -6,11 +6,8 @@ After=network.target Restart=on-success User=sickrage Group=sickrage - -#Type=forking -#PIDFile=/run/sickrage/sickrage.pid -#ExecStart=/usr/bin/env python2 /opt/sickrage/app/SiCKRAGE.py -q --daemon --nolaunch --datadir /opt/sickrage/data --pidfile=/run/sickrage/sickrage.pid -ExecStart=/usr/bin/env python2 /opt/sickrage/app/SiCKRAGE.py -q --nolaunch --datadir /opt/sickrage/data +ExecStart=/opt/sickrage/app/bin/python /opt/sickrage/app/SiCKRAGE.py --nolaunch --datadir /opt/sickrage/data [Install] WantedBy=multi-user.target + |