Mail archive
alpine-aports

[alpine-aports] [PATCH v2] testing/sickrage: new aport

From: Brice Johnson <bricej13_at_gmail.com>
Date: Mon, 7 Nov 2016 16:44:14 +0000

Created a package for [Sickrage](https://sickrage.github.io/), an automatic video library manager for TV shows.
---
# PATCH v2
- Removed superfluous comments
 testing/sickrage/APKBUILD             | 47 +++++++++++++++++++++++++++++++++++
 testing/sickrage/sickrage.confd       |  6 +++++
 testing/sickrage/sickrage.initd       | 37 +++++++++++++++++++++++++++
 testing/sickrage/sickrage.pre-install |  6 +++++
 4 files changed, 96 insertions(+)
 create mode 100644 testing/sickrage/APKBUILD
 create mode 100644 testing/sickrage/sickrage.confd
 create mode 100755 testing/sickrage/sickrage.initd
 create mode 100644 testing/sickrage/sickrage.pre-install
diff --git a/testing/sickrage/APKBUILD b/testing/sickrage/APKBUILD
new file mode 100644
index 0000000..56f1a58
--- /dev/null
+++ b/testing/sickrage/APKBUILD
_at_@ -0,0 +1,47 @@
+# Contributor: Brice Johnson <bricej13_at_gmail.com>
+# Maintainer: Brice Johnson <bricej13_at_gmail.com>
+pkgname=sickrage
+pkgver=2016.10.28
+pkgrel=0
+pkgdesc="A PVR application that downloads and manages your TV shows. Fork of sickbeard with tvrage, torrents, and anime support."
+pkgusers="sickrage"
+pkggroups="sickrage"
+url="https://sickrage.github.io/"
+arch="noarch"
+license="GPL3"
+depends="git openssl libssl1.0 python"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/SickRage/SickRage/archive/v${pkgver}-1.tar.gz
+	$pkgname.confd
+	$pkgname.initd"
+
+builddir="$srcdir"/SickRage-${pkgver}-1
+build() {
+	cd "$builddir"
+}
+
+package() {
+
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install
+
+	install -o sickrage -g sickrage -dm755 "$pkgdir/usr/share/sickrage"
+	cp -rp "$srcdir"/SickRage-$pkgver-1/* "$pkgdir/usr/share/sickrage"
+	chown -R sickrage:sickrage "$pkgdir/usr/share/sickrage" || return 1
+
+	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+
+}
+
+md5sums="4b375d8eedb77d3fdccda63bd6981c90  sickrage-2016.10.28.tar.gz
+cd82ad5e50507ec0780396b8b983c1b4  sickrage.confd
+efc28f7b96fea9cb0ea72b2e9704c0a0  sickrage.initd"
+sha256sums="0e71a5e963c4a6f5e477a610a138a61c74eb94d1c718817c95fcf063b8760e0c  sickrage-2016.10.28.tar.gz
+72de8b5784b66f8f0b70a1c757d7b20c3d11f187142a25baae44ddce758a2771  sickrage.confd
+4aa57777b7772e27a70abe2ae10e6f8cc38d871e8dc9502ea61e301fdb1f31b4  sickrage.initd"
+sha512sums="b25c8dae0e78ed6c163894ccfac19635a9f1c6fb2efdb75e4e8136a8fa31995d431c27d6647ff2ebdec0c9985bb818915fdd39278c6e6aa1d0a2f23654320418  sickrage-2016.10.28.tar.gz
+802a3e3e6ab70881b0d7f514dbab4c161bf60c03857181eaeb8ed61dc0c9bc4cf06ee9f81e3e565333ea71141b972163c5cec783ec44f713fce20ac8b25b85bf  sickrage.confd
+f6b1ddeafe8a3954ef928f56cdf6b8a176b6b52dce5e6f9682befb9a6044b8511b372e420146fe41fc6b0cb0e4192e6e5184b88506f3644c11362f503427d353  sickrage.initd"
diff --git a/testing/sickrage/sickrage.confd b/testing/sickrage/sickrage.confd
new file mode 100644
index 0000000..774c724
--- /dev/null
+++ b/testing/sickrage/sickrage.confd
_at_@ -0,0 +1,6 @@
+SICKRAGE_USER=sickrage  
+SICKRAGE_GROUP=sickrage  
+SICKRAGE_DIR=/usr/share/sickrage
+PATH_TO_PYTHON_2=/usr/bin/python2.7  
+SICKRAGE_DATADIR=/usr/share/sickrage
+SICKRAGE_CONFDIR=/usr/share/sickrage
diff --git a/testing/sickrage/sickrage.initd b/testing/sickrage/sickrage.initd
new file mode 100755
index 0000000..8a3168b
--- /dev/null
+++ b/testing/sickrage/sickrage.initd
_at_@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Distributed under the terms of the GNU General Public License v2
+
+# History
+# -------
+# 11/4/2016 	Brice Johnson		bricej13_at_gmail.com
+
+# You will need to create a configuration file in order for this script
+# to work properly. Please create /etc/conf.d/sickrage with the following:
+#
+# SICKRAGE_USER=<user you want sickrage to run under>
+# SICKRAGE_GROUP=<group you want sickrage to run under>
+# SICKRAGE_DIR=<path to Sickbeard.py>
+# PATH_TO_PYTHON_2=/usr/bin/python2.7
+# SICKRAGE_DATADIR=<directory that contains sickbeard.db file>
+# SICKRAGE_CONFDIR=<directory that contains Sickrage's config.ini file>
+#
+
+RUNDIR=/var/run/sickrage
+
+description="Sickrage"
+
+name="sickrage"
+command="${PATH_TO_PYTHON_2} ${SICKRAGE_DIR}/SickBeard.py"
+command_args="-d --pidfile /var/run/sickrage/sickrage.pid  --config ${SICKRAGE_CONFDIR}/config.ini  --datadir ${SICKRAGE_DATADIR}"
+pidfile="/var/run/sickrage/sickrage.pid"
+start_stop_daemon_args="--user ${SICKRAGE_USER} --group ${SICKRAGE_GROUP} --background"
+
+
+depend() {
+    need net
+}
+
+start_pre() {
+	checkpath -q -d -o ${SICKRAGE_USER}:${SICKRAGE_GROUP} -m 0770 "${RUNDIR}" 
+}
+
diff --git a/testing/sickrage/sickrage.pre-install b/testing/sickrage/sickrage.pre-install
new file mode 100644
index 0000000..26c68dc
--- /dev/null
+++ b/testing/sickrage/sickrage.pre-install
_at_@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S sickrage  2>/dev/null
+adduser -S -h /var/lib/sickrage -g "SickRage" -G sickrage sickrage  2>/dev/null
+
+exit 0
-- 
2.8.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Nov 07 2016 - 16:44:14 GMT