summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwillemw122018-10-28 08:32:19 +0100
committerwillemw122018-10-28 08:32:19 +0100
commit59fcf7a67c6581da10a9a6a90cf082a7ad84f645 (patch)
tree0c9be4fe33ed87b9f21cadf9f993f0fe902f9205
downloadaur-59fcf7a67c6581da10a9a6a90cf082a7ad84f645.tar.gz
Initial commit
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD71
-rw-r--r--sickchill-git.install26
-rw-r--r--sickchill.service16
-rw-r--r--sickchill.sysusers1
-rw-r--r--sickchill.tmpfile2
6 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3f491b0370e2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = sickchill-git
+ pkgdesc = Automatic video library manager for TV shows
+ pkgver = 2018.10.27.2.r1.g4f7a2a56d
+ pkgrel = 1
+ url = https://github.com/SickChill/SickChill
+ install = sickchill-git.install
+ arch = any
+ license = GPL3
+ makedepends = git
+ depends = nodejs
+ depends = python2-babel
+ depends = python2-cheetah
+ depends = python2-mako
+ optdepends = python2-notify: desktop notifications
+ optdepends = unrar: RAR archives
+ provides = sickchill
+ provides = sickrage
+ conflicts = sickchill
+ conflicts = sickrage
+ options = !strip
+ source = sickchill-git::git+https://github.com/SickChill/SickChill.git
+ source = sickchill.service
+ source = sickchill.sysusers
+ source = sickchill.tmpfile
+ md5sums = SKIP
+ md5sums = fd497f3e93f4920f39714be53b0f8809
+ md5sums = 97fb191af2e326d5aba2cf58270b4feb
+ md5sums = 515f13e391105a716ef6763ba8533fc7
+
+pkgname = sickchill-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c35a26ee4bb1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: willemw <willemw12@gmail.com>
+
+_pkgname=sickchill
+pkgname=$_pkgname-git
+pkgver=2018.10.27.2.r1.g4f7a2a56d
+pkgrel=1
+pkgdesc="Automatic video library manager for TV shows"
+arch=('any')
+url="https://github.com/SickChill/SickChill"
+license=('GPL3')
+#'python2-vcr' 'unrar'
+makedepends=('git')
+depends=('nodejs' 'python2-babel' 'python2-cheetah' 'python2-mako')
+# 'deluge: supported torrent client'
+# 'qbittorrent: supported torrent client'
+# 'rtorrent: supported torrent client'
+# 'sabnzbd: supported NZB downloader'
+# 'transmission-cli: supported torrent client'
+optdepends=('python2-notify: desktop notifications'
+ 'unrar: RAR archives')
+provides=($_pkgname 'sickrage')
+conflicts=($_pkgname 'sickrage')
+options=('!strip')
+install=$pkgname.install
+source=("$pkgname::git+https://github.com/SickChill/SickChill.git"
+ 'sickchill.service'
+ 'sickchill.sysusers'
+ 'sickchill.tmpfile')
+md5sums=('SKIP'
+ 'fd497f3e93f4920f39714be53b0f8809'
+ '97fb191af2e326d5aba2cf58270b4feb'
+ '515f13e391105a716ef6763ba8533fc7')
+
+pkgver() {
+ cd $pkgname
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+#prepare() {
+# cd $pkgname
+# sed -i 's/UnRAR2/unrar2/g' lib/unrar2/test_UnRAR2.py
+#}
+
+#build() {
+# cd $pkgname
+# python2 setup.py --quiet build
+#}
+
+#check() {
+# cd $pkgname
+# python2 setup.py test
+#
+# cd lib/unrar2
+# PYTHONPATH="$(pwd)/..:$PYTHONPATH" python2 test_UnRAR2.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
+ #python2 setup.py install --prefix=/opt/sickchill/app --install-lib=/opt/sickchill/app --root="$pkgdir" --optimize=1
+ cp -rp $pkgname/* "$pkgdir/opt/sickchill/app/"
+
+ warning "If the upgrade fails with \"error: failed to commit transaction (conflicting files)\", then uninstall first"
+}
+
diff --git a/sickchill-git.install b/sickchill-git.install
new file mode 100644
index 000000000000..c6e6ded67562
--- /dev/null
+++ b/sickchill-git.install
@@ -0,0 +1,26 @@
+post_install() {
+ systemd-sysusers sickchill.conf
+ systemd-tmpfiles --create sickchill.conf
+ chown -R sickchill:sickchill /opt/sickchill
+
+ echo "==> Start and enable sickchill.service. Then visit http://localhost:8081/"
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ systemctl stop sickchill.service
+}
+
+post_remove() {
+ rm -rf /opt/sickchill/app
+
+ echo "==> To delete the configuration files, run as root: rm -rf /opt/sickchill/data"
+
+ # Do not delete the 'sickchill' user automatically. It may still own files.
+ # If 'sickchill' is the only user in group 'sickchill', then userdel will also delete the group.
+ echo "==> To delete the \"sickchill\" user, run as root: userdel --force sickchill"
+}
+
diff --git a/sickchill.service b/sickchill.service
new file mode 100644
index 000000000000..7c548e0722b0
--- /dev/null
+++ b/sickchill.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=SickChill Daemon
+After=network.target
+
+[Service]
+Restart=on-success
+User=sickchill
+Group=sickchill
+
+Type=forking
+GuessMainPID=no
+#ExecStart=/usr/bin/env python2 /opt/sickchill/app/SickBeard.py --quiet --daemon --nolaunch --datadir=/opt/sickchill/data
+ExecStart=/usr/bin/python2 /opt/sickchill/app/SickBeard.py --quiet --daemon --nolaunch --datadir=/opt/sickchill/data
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sickchill.sysusers b/sickchill.sysusers
new file mode 100644
index 000000000000..e535bb2be54f
--- /dev/null
+++ b/sickchill.sysusers
@@ -0,0 +1 @@
+u sickchill - "SickChill Daemon" /opt/sickchill
diff --git a/sickchill.tmpfile b/sickchill.tmpfile
new file mode 100644
index 000000000000..bb9221e30cc8
--- /dev/null
+++ b/sickchill.tmpfile
@@ -0,0 +1,2 @@
+d /run/sickchill 0775 sickchill sickchill
+