summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwillemw122020-09-04 10:55:36 +0200
committerwillemw122020-09-04 10:55:36 +0200
commit8738a622b3a5890b63c498a33fc2ee9beffc64a3 (patch)
treee5e9178b6f4586e653c000bd169bc584ef74e629
parent53a3149f4258175539f3335ce5253f9fc699e39e (diff)
downloadaur-8738a622b3a5890b63c498a33fc2ee9beffc64a3.tar.gz
Switch from git install to pip install
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD50
-rw-r--r--sickchill.service3
3 files changed, 33 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3c67ce1a334..66314166937 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,24 @@
pkgbase = sickchill-git
pkgdesc = Automatic video library manager for TV shows
- pkgver = 2020.07.09.1.r266.g319d20e55
+ pkgver = 0.0.55.r0
pkgrel = 1
- url = https://github.com/SickChill/SickChill
+ url = https://sickchill.github.io
install = sickchill-git.install
arch = any
license = GPL3
- makedepends = git
- makedepends = python-pygithub
+ makedepends = python-virtualenv
depends = nodejs
- depends = python
+ depends = python-pip
+ depends = python-pyopenssl
+ depends = python-virtualenv
optdepends = unrar: for RAR archives
provides = sickchill
conflicts = sickchill
options = !strip
- source = sickchill-git::git+https://github.com/SickChill/SickChill.git#branch=develop
source = sickchill.service
source = sickchill.sysusers
source = sickchill.tmpfile
- md5sums = SKIP
- md5sums = fe1030d29e883682a9c3117867edd9d8
+ md5sums = 309b8555af7b355f16a3ec784771f426
md5sums = 97fb191af2e326d5aba2cf58270b4feb
md5sums = 515f13e391105a716ef6763ba8533fc7
diff --git a/PKGBUILD b/PKGBUILD
index d68a267a85b..725484a165a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,60 +1,60 @@
# Maintainer: willemw <willemw12@gmail.com>
+# NOTE This PIP package behaves like a VCS package: to update, reinstall the package.
+# That is the only reason why this package ends on -git.
+
pkgname=sickchill-git
-pkgver=2020.07.09.1.r266.g319d20e55
+pkgver=0.0.55.r0
pkgrel=1
pkgdesc="Automatic video library manager for TV shows"
arch=('any')
-url="https://github.com/SickChill/SickChill"
+url="https://sickchill.github.io"
license=('GPL3')
-depends=('nodejs' 'python')
-makedepends=('git' 'python-pygithub')
+depends=('nodejs' 'python-pip' 'python-pyopenssl' 'python-virtualenv')
+makedepends=('python-virtualenv')
# 'deluge: supported torrent client'
# 'qbittorrent: supported torrent client'
# 'rtorrent: supported torrent client'
# 'sabnzbd: supported NZB downloader'
# 'transmission-cli: supported torrent client'
+#mediainfo
optdepends=('unrar: for RAR archives')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
options=('!strip')
install=$pkgname.install
-#source=("$pkgname::git+$url.git"
-source=("$pkgname::git+$url.git#branch=develop"
- 'sickchill.service'
+source=('sickchill.service'
'sickchill.sysusers'
'sickchill.tmpfile')
-md5sums=('SKIP'
- 'fe1030d29e883682a9c3117867edd9d8'
+md5sums=('309b8555af7b355f16a3ec784771f426'
'97fb191af2e326d5aba2cf58270b4feb'
'515f13e391105a716ef6763ba8533fc7')
pkgver() {
- cd $pkgname
- git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ pip search "${pkgname%-git}" | awk '$1 == "'${pkgname%-git}'" { gsub("[()]", ""); print $2 ".r0" }'
+}
+
+prepare() {
+ rm -rf build
}
-#build() {
-# cd $pkgname
-# python setup.py --quiet build
-#}
+build() {
+ mkdir -p build
+ cd build
-#check() {
-# cd $pkgname
-# python setup.py test
-#}
+ virtualenv .
+ ./bin/pip install --isolated --no-warn-script-location --root=. --prefix=. sickchill
+
+ sed -i '1s|.*|#!/opt/sickchill/app/bin/python|' bin/SickChill.py
+}
package() {
install -Dm644 sickchill.service "$pkgdir/usr/lib/systemd/system/sickchill.service"
install -Dm644 sickchill.sysusers "$pkgdir/usr/lib/sysusers.d/sickchill.conf"
install -Dm644 sickchill.tmpfile "$pkgdir/usr/lib/tmpfiles.d/sickchill.conf"
- install -dm755 "$pkgdir"/opt/sickchill/{app,data}
-
- # The install type is "source": .git folder is not included
- #cd $pkgname
- #python setup.py install --prefix=/opt/sickchill/app --install-lib=/opt/sickchill/app --root="$pkgdir" --optimize=1
- cp -a $pkgname/* "$pkgdir/opt/sickchill/app/"
+ install -dm755 "$pkgdir"/opt/sickchill/data
+ cp -a build "$pkgdir/opt/sickchill/app"
warning "If the upgrade fails with \"error: failed to commit transaction (conflicting files)\", then uninstall first"
}
diff --git a/sickchill.service b/sickchill.service
index 4c9bbe4f76b..385b031b158 100644
--- a/sickchill.service
+++ b/sickchill.service
@@ -8,8 +8,7 @@ User=sickchill
Group=sickchill
Type=simple
-Environment=PYTHONPATH=/opt/sickchill/app/lib3
-ExecStart=/opt/sickchill/app/SickChill.py --quiet --nolaunch --datadir=/opt/sickchill/data
+ExecStart=/opt/sickchill/app/bin/SickChill.py --quiet --nolaunch --datadir=/opt/sickchill/data
[Install]
WantedBy=multi-user.target