diff options
-rw-r--r-- | www-apps/sonarr/files/Sonarr | 3 | ||||
-rw-r--r-- | www-apps/sonarr/files/sonarr.init-r1 | 7 | ||||
-rw-r--r-- | www-apps/sonarr/files/sonarr.service-r1 | 30 | ||||
-rw-r--r-- | www-apps/sonarr/sonarr-3.0.9.1549-r1.ebuild | 47 |
4 files changed, 87 insertions, 0 deletions
diff --git a/www-apps/sonarr/files/Sonarr b/www-apps/sonarr/files/Sonarr new file mode 100644 index 000000000000..773b3504ca3e --- /dev/null +++ b/www-apps/sonarr/files/Sonarr @@ -0,0 +1,3 @@ +#!/bin/sh +/usr/bin/mono /opt/sonarr/Sonarr.exe "$@" + diff --git a/www-apps/sonarr/files/sonarr.init-r1 b/www-apps/sonarr/files/sonarr.init-r1 new file mode 100644 index 000000000000..dd1b7388738a --- /dev/null +++ b/www-apps/sonarr/files/sonarr.init-r1 @@ -0,0 +1,7 @@ +#!/sbin/openrc-run + +pidfile="/run/sonarr.pid" +command="/opt/sonarr/Sonarr" +command_user="sonarr:sonarr" +command_background=true + diff --git a/www-apps/sonarr/files/sonarr.service-r1 b/www-apps/sonarr/files/sonarr.service-r1 new file mode 100644 index 000000000000..542f5d7f1031 --- /dev/null +++ b/www-apps/sonarr/files/sonarr.service-r1 @@ -0,0 +1,30 @@ +[Unit] +Description=Sonarr is a Smart PVR for newsgroup and bittorrent users. +After=syslog.target network.target network-online.target + +[Service] +User=sonarr +Group=sonarr + +Type=simple +ExecStart=/opt/sonarr/Sonarr +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +PrivateTmp=yes +PrivateDevices=yes +PrivateMounts=yes +ProtectHome=yes +ProtectSystem=full +NoNewPrivileges=yes +ProtectHostname=yes +ProtectClock=yes +ProtectKernelTunables=yes +ProtectKernelModules=yes +ProtectKernelLogs=yes +ProtectControlGroups=yes +RestrictRealtime=yes + +[Install] +WantedBy=multi-user.target diff --git a/www-apps/sonarr/sonarr-3.0.9.1549-r1.ebuild b/www-apps/sonarr/sonarr-3.0.9.1549-r1.ebuild new file mode 100644 index 000000000000..a3d2abfcc0bc --- /dev/null +++ b/www-apps/sonarr/sonarr-3.0.9.1549-r1.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-r1" ${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" +} |