summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwillemw122015-06-09 09:08:00 +0200
committerwillemw122015-06-09 09:08:00 +0200
commit759d88d085ca0a5ec7e85d5a700b841551bb04cf (patch)
tree3a6f7be170985fe8f5b52f54fefa518cf29cf890
downloadaur-759d88d085ca0a5ec7e85d5a700b841551bb04cf.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD47
-rw-r--r--sickrage-git.install30
-rw-r--r--sickrage.service15
-rw-r--r--sickrage.tmpfile2
5 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4571036c0ce
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = sickrage-git
+ pkgdesc = A PVR application that downloads and manages your TV shows. Echel0n fork of sickbeard, with tvrage and torrents support.
+ pkgver = 4.0.24.r2.gf9246bc
+ pkgrel = 1
+ url = https://github.com/SiCKRAGETV/SickRage
+ install = sickrage-git.install
+ arch = any
+ license = GPL3
+ makedepends = git
+ depends = python2-cheetah
+ optdepends = python2-notify: desktop notifications
+ optdepends = python2-pyopenssl: enable ssl
+ optdepends = sabnzbd: NZB downloader
+ optdepends = unrar: rar archives
+ provides = sickrage
+ conflicts = sickrage
+ options = !strip
+ source = sickrage-git::git://github.com/SiCKRAGETV/SickRage.git
+ source = sickrage.service
+ source = sickrage.tmpfile
+ md5sums = SKIP
+ md5sums = 9c03e4b2ed134981afefc643cac2c282
+ md5sums = f7a12df978d649da4e77d88e03f50252
+
+pkgname = sickrage-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8aec336d56e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: willemw <willemw12@gmail.com>
+# Contibutor: Justin Dray <justin@dray.be>
+
+_pkgname=sickrage
+pkgname=$_pkgname-git
+pkgver=4.0.24.r2.gf9246bc
+pkgrel=1
+pkgdesc="A PVR application that downloads and manages your TV shows. Echel0n fork of sickbeard, with tvrage and torrents support."
+arch=('any')
+url="https://github.com/SiCKRAGETV/SickRage"
+license=('GPL3')
+depends=('python2-cheetah')
+makedepends=('git')
+optdepends=('python2-notify: desktop notifications'
+ 'python2-pyopenssl: enable ssl'
+ 'sabnzbd: NZB downloader'
+ 'unrar: rar archives')
+provides=($_pkgname)
+conflicts=($_pkgname)
+options=('!strip')
+install=$pkgname.install
+source=("$pkgname::git://github.com/SiCKRAGETV/SickRage.git"
+ 'sickrage.service'
+ 'sickrage.tmpfile')
+md5sums=('SKIP'
+ '9c03e4b2ed134981afefc643cac2c282'
+ 'f7a12df978d649da4e77d88e03f50252')
+
+pkgver() {
+ cd $pkgname
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $pkgname
+ sed -i 's|#![ \t]*/usr/bin/env python[ \t\r]*$|#!/usr/bin/env python2|' autoProcessTV/*.py
+}
+
+package() {
+ # 'source' install type. Does not include git repository files
+ install -dm755 "$pkgdir/opt/sickrage"
+ cp -rp $pkgname/* "$pkgdir/opt/sickrage"
+
+ install -Dm644 sickrage.service "$pkgdir/usr/lib/systemd/system/sickrage.service"
+ install -Dm644 sickrage.tmpfile "$pkgdir/usr/lib/tmpfiles.d/sickrage.conf"
+}
+
diff --git a/sickrage-git.install b/sickrage-git.install
new file mode 100644
index 00000000000..479e1e715f9
--- /dev/null
+++ b/sickrage-git.install
@@ -0,0 +1,30 @@
+post_install() {
+ SB_DATA=/opt/sickrage
+
+ # Create or repair SickRage user/group.
+ if grep -q "^sickrage" /etc/group &> /dev/null ; then
+ groupmod -n sickrage sickrage &> /dev/null
+ else
+ groupadd -r sickrage &> /dev/null
+ fi
+ if grep -q "^sickrage:" /etc/passwd 2> /dev/null ; then
+ usermod -s /bin/false -c "SickRage daemon user" -d $SB_DATA -g sickrage sickrage &> /dev/null
+ else
+ useradd -s /bin/false -c "SickRage daemon user" -d $SB_DATA -g sickrage -r sickrage &> /dev/null
+ fi
+
+ chown -R sickrage:sickrage /opt/sickrage
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ echo "==> Some files in /opt/sickrage may not have been removed."
+
+ # Do not delete the 'sickrage' user automatically. It may still own files.
+ # If 'sickrage' is the only user in group 'sickrage', then the group will also be deleted.
+ echo "==> To delete the 'sickrage' user, run as root: userdel --force sickrage"
+}
+
diff --git a/sickrage.service b/sickrage.service
new file mode 100644
index 00000000000..a8784e5a912
--- /dev/null
+++ b/sickrage.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=SickRage Daemon
+After=network.target
+
+[Service]
+Restart=always
+User=sickrage
+Group=sickrage
+#Type=forking
+#PIDFile=/run/sickrage/sickrage.pid
+#ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py --quiet --daemon --nolaunch --pidfile=/run/sickrage/sickrage.pid --config /opt/sickrage/config.ini --datadir /opt/sickrage
+ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py --quiet --config /opt/sickrage/config.ini --datadir /opt/sickrage
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sickrage.tmpfile b/sickrage.tmpfile
new file mode 100644
index 00000000000..f636059b9c6
--- /dev/null
+++ b/sickrage.tmpfile
@@ -0,0 +1,2 @@
+d /run/sickrage 0775 sickrage sickrage
+