diff --git a/www-apps/sonarr/Manifest b/www-apps/sonarr/Manifest new file mode 100644 index 0000000000000..02cb272ebb45f --- /dev/null +++ b/www-apps/sonarr/Manifest @@ -0,0 +1 @@ +DIST Sonarr.main.3.0.8.1507.linux.tar.gz 13647325 BLAKE2B bd269ec2e628075548c9c11db0f9d31f0b9a8c24bb55e0b7d0c58cc32c33423ca4988e9e63170fa6b5f49d438877a88402cebca3183fb98ac5995eb2a38e96e5 SHA512 32efec2207e853a1d7737fc72e9484e62c07a4b39f7e9c6ea0519bcc3220bf4bdb189c6b5dc30aa168912ba912a78c4c5832e2b84bc0a42c46844e76d3b9cc1a diff --git a/www-apps/sonarr/files/sonarr.init b/www-apps/sonarr/files/sonarr.init new file mode 100644 index 0000000000000..2ca5082cfbc0f --- /dev/null +++ b/www-apps/sonarr/files/sonarr.init @@ -0,0 +1,8 @@ +#!/sbin/openrc-run + +pidfile="/run/sonarr.pid" +command="mono" +command_args="/opt/sonarr/Sonarr.exe" +command_user="sonarr:sonarr" +command_background=true + diff --git a/www-apps/sonarr/files/sonarr.logrotate b/www-apps/sonarr/files/sonarr.logrotate new file mode 100644 index 0000000000000..3d374d3ad3c24 --- /dev/null +++ b/www-apps/sonarr/files/sonarr.logrotate @@ -0,0 +1,7 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +/var/lib/sonarr/.config/NzbDrone/logs/*.txt{ + missingok + su sonarr sonarr +} diff --git a/www-apps/sonarr/files/sonarr.service b/www-apps/sonarr/files/sonarr.service new file mode 100644 index 0000000000000..562ad1229fd82 --- /dev/null +++ b/www-apps/sonarr/files/sonarr.service @@ -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=/usr/bin/mono /opt/sonarr/Sonarr.exe +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/metadata.xml b/www-apps/sonarr/metadata.xml new file mode 100644 index 0000000000000..dac0f3be1aaa2 --- /dev/null +++ b/www-apps/sonarr/metadata.xml @@ -0,0 +1,21 @@ + + + + + mcrawford@eliteitminds.com + Michael Crawford + Primary maintainer + + + proxy-maint@gentoo.org + Proxy Maintainers + + + candrews@gentoo.org + Craig Andrews + + + Sonarr/Sonarr + https://github.com/Sonarr/Sonarr/issues + + diff --git a/www-apps/sonarr/sonarr-3.0.8.1507.ebuild b/www-apps/sonarr/sonarr-3.0.8.1507.ebuild new file mode 100644 index 0000000000000..36a30c93cf454 --- /dev/null +++ b/www-apps/sonarr/sonarr-3.0.8.1507.ebuild @@ -0,0 +1,42 @@ +# 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" + +S="${WORKDIR}/Sonarr" + +src_install() { + newinitd "${FILESDIR}/${PN}.init" ${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!" + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newunit "${FILESDIR}/${PN}.service" "${PN}@.service" +}