summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2022-08-10 09:16:47 -0400
committerCraig Andrews <candrews@gentoo.org>2022-08-10 09:17:29 -0400
commit2737bb5e0286b4b497fff427bf01b2c802e299df (patch)
tree77a87f58b57baa4ee89c8a07a80caaafc44c75a7 /www-apps/sonarr
parentdev-python/exam: enable py3.11 (diff)
downloadgentoo-2737bb5e0286b4b497fff427bf01b2c802e299df.tar.gz
gentoo-2737bb5e0286b4b497fff427bf01b2c802e299df.tar.bz2
gentoo-2737bb5e0286b4b497fff427bf01b2c802e299df.zip
www-apps/sonarr: allowing overriding user/group in openrc init script
Closes: https://bugs.gentoo.org/864581 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'www-apps/sonarr')
-rw-r--r--www-apps/sonarr/files/sonarr.init-r27
-rw-r--r--www-apps/sonarr/sonarr-3.0.9.1549-r2.ebuild47
2 files changed, 54 insertions, 0 deletions
diff --git a/www-apps/sonarr/files/sonarr.init-r2 b/www-apps/sonarr/files/sonarr.init-r2
new file mode 100644
index 000000000000..76b8dbed164b
--- /dev/null
+++ b/www-apps/sonarr/files/sonarr.init-r2
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+
+pidfile="/run/sonarr.pid"
+command="/opt/sonarr/Sonarr"
+command_user="${GROUP:-sonarr}:${USER:-sonarr}"
+command_background=true
+
diff --git a/www-apps/sonarr/sonarr-3.0.9.1549-r2.ebuild b/www-apps/sonarr/sonarr-3.0.9.1549-r2.ebuild
new file mode 100644
index 000000000000..49124b0696ba
--- /dev/null
+++ b/www-apps/sonarr/sonarr-3.0.9.1549-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+SRC_URI="https://download.sonarr.tv/v3/main/${PV}/Sonarr.main.${PV}.linux.tar.gz"
+
+DESCRIPTION="Sonarr is a Smart PVR for newsgroup and bittorrent users"
+HOMEPAGE="https://www.sonarr.tv"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="bindist strip test"
+
+RDEPEND="
+ acct-group/sonarr
+ acct-user/sonarr
+ >=dev-lang/mono-6.6.0.161
+ media-video/mediainfo
+ dev-db/sqlite"
+
+QA_PREBUILT="*"
+
+S="${WORKDIR}/Sonarr"
+
+src_install() {
+ newinitd "${FILESDIR}/${PN}.init-r2" ${PN}
+
+ keepdir /var/lib/${PN}
+ fowners -R ${PN}:${PN} /var/lib/${PN}
+
+ insinto /etc/logrotate.d
+ insopts -m0644 -o root -g root
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodir "/opt/${PN}"
+ cp -R "${S}/." "${D}/opt/${PN}" || die "Install failed!"
+
+ exeinto "/opt/${PN}"
+ doexe "${FILESDIR}/Sonarr"
+
+ systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}@.service"
+}