summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD56
-rw-r--r--sickrage-git.install24
-rw-r--r--sickrage.service4
-rw-r--r--sickrage.sysusers1
5 files changed, 54 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 39acf3b515a..306209431ac 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
-# Generated by mksrcinfo v8
-# Sat Dec 12 14:32:15 UTC 2015
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 = 4.1.0.2.r370.g4da36fb
+ pkgver = 8.8.4.r41.g10d0371b3
pkgrel = 1
url = https://github.com/SiCKRAGETV/SickRage
install = sickrage-git.install
arch = any
license = GPL3
makedepends = git
- depends = python2-mako
+ depends = python2-apscheduler
depends = python2-cheetah
- optdepends = python2-notify: desktop notifications
+ depends = python2-mako
+ depends = python2-notify
+ depends = python2-tornado
+ depends = python2-tzlocal
optdepends = python2-pyopenssl: enable SSL
optdepends = unrar: RAR archives
provides = sickrage
@@ -19,9 +20,11 @@ pkgbase = sickrage-git
options = !strip
source = sickrage-git::git://github.com/SiCKRAGETV/SickRage.git
source = sickrage.service
+ source = sickrage.sysusers
source = sickrage.tmpfile
md5sums = SKIP
- md5sums = 6b19af092794f3d65a4651ef1a9c7e2e
+ md5sums = 33532fd9a661c6dd38afdabb45695980
+ md5sums = 6a7db7e14e74072d29e482b06b41dfa7
md5sums = f7a12df978d649da4e77d88e03f50252
pkgname = sickrage-git
diff --git a/PKGBUILD b/PKGBUILD
index 100ea0d2997..cdde580038f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,32 +2,39 @@
# Contibutor: Justin Dray <justin@dray.be>
-# In case of upgrade errors:
+#########################################################################################################
+# If upgrade fails with:
# error: failed to commit transaction (conflicting files)
# sickrage-git: /opt/sickrage/... exists in filesystem
-# Remove the conflicting files manually. The following will remove all or most of the conflicting files:
-# # rm -rf /opt/sickrage/{contrib/,contributing.md,COPYING.txt,gui/,lib/,runscripts/,sickbeard/,SickBeard.py,sickrage/,tests/}
-# Use at your own risk!
+#
+# Then remove the conflicting files manually. The following removes all of the conflicting files as root:
+# rm -r $(ls -1d /opt/sickrage/* | grep -Ev "/backup.*|/cache.*|/config.ini.*|/Log*.*|/.*\.db.*")
+#
+# Use at your own risk! Stop sickrage.service and backup /opt/sickrage first.
+#########################################################################################################
_pkgname=sickrage
pkgname=$_pkgname-git
-pkgver=4.1.0.2.r370.g4da36fb
+pkgver=8.8.4.r41.g10d0371b3
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://github.com/SiCKRAGETV/SickRage"
license=('GPL3')
-#unrar
makedepends=('git')
-depends=('python2-mako' 'python2-cheetah')
+depends=('python2-apscheduler'
+ 'python2-cheetah'
+ 'python2-mako'
+ 'python2-notify'
+ 'python2-tornado'
+ 'python2-tzlocal')
# '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'
- 'python2-pyopenssl: enable SSL'
+optdepends=('python2-pyopenssl: enable SSL'
'unrar: RAR archives')
provides=($_pkgname)
conflicts=($_pkgname)
@@ -35,32 +42,37 @@ options=('!strip')
install=$pkgname.install
source=("$pkgname::git://github.com/SiCKRAGETV/SickRage.git"
'sickrage.service'
+ 'sickrage.sysusers'
'sickrage.tmpfile')
md5sums=('SKIP'
- '6b19af092794f3d65a4651ef1a9c7e2e'
+ '33532fd9a661c6dd38afdabb45695980'
+ '6a7db7e14e74072d29e482b06b41dfa7'
'f7a12df978d649da4e77d88e03f50252')
pkgver() {
cd $pkgname
- git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd $pkgname
+ python2 setup.py build
}
-#prepare() {
-# cd $pkgname
-# sed -i 's/UnRAR2/unrar2/g' lib/unrar2/test_UnRAR2.py
-#}
-#
#check() {
-# cd $pkgname/lib/unrar2
-# PYTHONPATH="$(pwd)/..:$PYTHONPATH" python2 test_UnRAR2.py
+# cd $pkgname
+# python2 setup.py test
#}
package() {
- # The sickrage "SOURCE" install type does not have the .git folder (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.sysusers "$pkgdir/usr/lib/sysusers.d/sickrage.conf"
install -Dm644 sickrage.tmpfile "$pkgdir/usr/lib/tmpfiles.d/sickrage.conf"
+
+ # The install type is "source": .git folder is not included
+ #cd $pkgname
+ #python2 setup.py install --prefix=/opt/sickrage --install-lib=/opt/sickrage --root="$pkgdir" --optimize=1
+ install -dm755 "$pkgdir/opt/sickrage"
+ cp -rp $pkgname/* "$pkgdir/opt/sickrage"
}
diff --git a/sickrage-git.install b/sickrage-git.install
index 759a81402a7..cf8395fef51 100644
--- a/sickrage-git.install
+++ b/sickrage-git.install
@@ -1,19 +1,11 @@
post_install() {
- SR_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 $SR_DATA -g sickrage sickrage &> /dev/null
- else
- useradd -s /bin/false -c "SickRage daemon user" -d $SR_DATA -g sickrage -r sickrage &> /dev/null
- fi
-
+ systemd-sysusers sickrage.conf
+ systemd-tmpfiles --create sickgear.conf
chown -R sickrage:sickrage /opt/sickrage
+ echo "==> Start and enable sickrage.service. Then visit http://localhost:8081/"
+ echo
+ echo "==> If an upgrade fails with \"error: failed to commit transaction (conflicting files)\","
+ echo "==> then remove the conflicting files manually. See comments in the PKGBUILD file."
}
post_upgrade() {
@@ -21,10 +13,10 @@ post_upgrade() {
}
post_remove() {
- echo "==> Some files in /opt/sickrage may not have been removed."
+ echo -e "\n==> Some files in /opt/sickrage may not have been removed.\n"
# 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.
+ # If 'sickrage' is the only user in group 'sickrage', then userdel will also delete the group.
echo "==> To delete the 'sickrage' user, run as root: userdel --force sickrage"
}
diff --git a/sickrage.service b/sickrage.service
index a0307c2effa..192dc17beac 100644
--- a/sickrage.service
+++ b/sickrage.service
@@ -9,8 +9,8 @@ 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
+#ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py -q --daemon --nolaunch --config /opt/sickrage/config.ini --datadir /opt/sickrage --pidfile=/run/sickrage/sickrage.pid
+ExecStart=/usr/bin/env python2 /opt/sickrage/SickBeard.py -q --nolaunch --config /opt/sickrage/config.ini --datadir /opt/sickrage
[Install]
WantedBy=multi-user.target
diff --git a/sickrage.sysusers b/sickrage.sysusers
new file mode 100644
index 00000000000..08a67ff32ad
--- /dev/null
+++ b/sickrage.sysusers
@@ -0,0 +1 @@
+u sickrage - "SickRage Daemon" /opt/sickrage