-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch for new package rev, rename old package
Co-Authored-By: hgy59 <[email protected]>
- Loading branch information
Showing
16 changed files
with
236 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PKG_NAME = Sonarr | ||
PKG_VERS = 3.0.9.1549 | ||
PKG_EXT = tar.gz | ||
PKG_DIST_NAME = $(PKG_NAME).main.$(PKG_VERS).linux.$(PKG_EXT) | ||
PKG_DIST_SITE = https://download.sonarr.tv/v3/main/$(PKG_VERS) | ||
PKG_DIR = $(PKG_NAME) | ||
|
||
DEPENDS = | ||
|
||
HOMEPAGE = https://sonarr.tv | ||
COMMENT = Sonarr is a PVR for newsgroup users. It can monitor multiple RSS feeds for new episodes of your favourite shows and will grab, sorts and rename them. It can also be configured to automatically upgrade the quality of files already downloaded if a better quality format becomes available. | ||
LICENSE = GNU GPL v3 | ||
|
||
INSTALL_TARGET = sonarr_install | ||
|
||
include ../../mk/spksrc.install-resources.mk | ||
|
||
.PHONY: sonarr_install | ||
sonarr_install: | ||
mkdir -p $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR) | ||
tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rsc:share/Sonarr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Sonarr.main.3.0.9.1549.linux.tar.gz SHA1 f475b4b070df9865c5ff777d532683f753151d97 | ||
Sonarr.main.3.0.9.1549.linux.tar.gz SHA256 05ad67aef9e599590f23e384a704a13717cd2eba714be37bc2cc776a391c1a84 | ||
Sonarr.main.3.0.9.1549.linux.tar.gz MD5 823a85b54d4b797d966340e684a64f40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
SPK_NAME = nzbdrone | ||
SPK_VERS = $(shell date +%Y%m%d) | ||
SPK_REV = 21 | ||
SPK_ICON = src/sonarr.png | ||
|
||
# Mono not supported on ppc platforms. C.f. cross/mono/Makefile and references therein for details. | ||
UNSUPPORTED_ARCHS = $(PPC_ARCHS) | ||
|
||
DEPENDS = cross/curl cross/mediainfo cross/sqlite cross/sonarr | ||
|
||
SPK_DEPENDS = "mono>3.6" | ||
|
||
MAINTAINER = SynoCommunity | ||
DESCRIPTION = Sonarr is a PVR for newsgroup and torrent users. It can monitor multiple RSS feeds for new episodes of your favourite shows and will grab, sorts and rename them. It can also be configured to automatically upgrade the quality of files already downloaded if a better quality format becomes available. | ||
DESCRIPTION_FRE = Sonarr est un PVR pour les utilisateurs de groupes de discussion et torrents. Il peut surveiller plusieurs flux RSS pour les nouveaux épisodes de vos séries préférées et saisira, sortes et les renomme. Il peut également être configuré pour mettre à jour automatiquement la qualité des fichiers déjà téléchargés si un meilleur format de qualité devient disponible. | ||
DESCRIPTION_SPN = Sonarr es un PVR para los usuarios de grupos de noticias y torrents. Se puede controlar múltiples canales RSS para nuevos episodios de sus programas favoritos y se agarra, tipo y les cambia el nombre. También puede ser configurado para actualizar automáticamente la calidad de los archivos ya descargados si un formato de mejor calidad disponible. | ||
DISPLAY_NAME = Sonarr3 | ||
STARTABLE = yes | ||
CHANGELOG = "1. Enlarge the service start/stop timeout to 90 seconds<br>2. Avoid Sonarr downgrade on package update<br>3. Upgrade to Sonarr 3.0.9.1549<br>4. Implement fix for alternate TMP directory" | ||
|
||
HOMEPAGE = https://sonarr.tv | ||
LICENSE = GPLv3 | ||
|
||
SERVICE_USER = auto | ||
SERVICE_SETUP = src/service-setup.sh | ||
SERVICE_PORT = 8989 | ||
SERVICE_PORT_TITLE = $(DISPLAY_NAME) | ||
|
||
# Admin link for in DSM UI | ||
ADMIN_PORT = $(SERVICE_PORT) | ||
|
||
WIZARDS_DIR = src/wizard/ | ||
|
||
POST_STRIP_TARGET = sonarr_extra_install | ||
|
||
include ../../mk/spksrc.spk.mk | ||
|
||
# use alternate TMPDIR as /tmp might be too small and not accessible on DSM >= 7.1. | ||
USE_ALTERNATE_TMPDIR = 1 | ||
|
||
PACKAGE_VERSION = $(SPK_NAME_ARCH)-$(SPK_TCVERS)_$(SPK_VERS)-$(SPK_REV) | ||
PACKAGE_AUTHOR = [SynoCommunity](https://synocommunity.com) | ||
|
||
.PHONY: sonarr_extra_install | ||
sonarr_extra_install: | ||
install -m 755 -d $(STAGING_DIR)/var/.config/Sonarr | ||
install -m 644 src/config.xml $(STAGING_DIR)/var/.config/Sonarr/config.xml | ||
@echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/share/Sonarr/package_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<Config> | ||
<Branch>main</Branch> | ||
<LaunchBrowser>False</LaunchBrowser> | ||
<UpdateAutomatically>True</UpdateAutomatically> | ||
<UpdateMechanism>BuiltIn</UpdateMechanism> | ||
</Config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
PATH="${SYNOPKG_PKGDEST}/bin:${PATH}" | ||
MONO_PATH="/var/packages/mono/target/bin" | ||
MONO="${MONO_PATH}/mono" | ||
SONARR="${SYNOPKG_PKGDEST}/share/Sonarr/Sonarr.exe" | ||
|
||
# Sonarr uses custom Config and PID directories | ||
HOME_DIR="${SYNOPKG_PKGVAR}" | ||
CONFIG_DIR="${SYNOPKG_PKGVAR}/.config" | ||
SONARR_CONFIG_DIR="${CONFIG_DIR}/Sonarr" | ||
PID_FILE="${SONARR_CONFIG_DIR}/sonarr.pid" | ||
|
||
# Some have it stored in the root of package | ||
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config" | ||
|
||
# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537) | ||
if [ "$SYNOPKG_DSM_ARCH" == "88f6281" ] || [ "$SYNOPKG_DSM_ARCH" == "88f6282" ]; then | ||
MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO}" | ||
fi | ||
|
||
# for DSM < 7 only: | ||
GROUP="sc-download" | ||
LEGACY_GROUP="sc-media" | ||
|
||
SERVICE_COMMAND="env PATH=${MONO_PATH}:${PATH} HOME=${HOME_DIR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} ${SONARR}" | ||
SVC_BACKGROUND=y | ||
SVC_WAIT_TIMEOUT=90 | ||
|
||
validate_preinst () | ||
{ | ||
# use install_log to write to installer log file. | ||
install_log "validate_preinst ${SYNOPKG_PKG_STATUS}" | ||
|
||
# check if the installed distribution is a legacy version | ||
if [ -f "${SYNOPKG_PKGDEST}/share/NzbDrone/NzbDrone.exe" ]; then | ||
# v2 installed | ||
exit 1 | ||
fi | ||
} | ||
|
||
service_postinst () | ||
{ | ||
echo "Set update required" | ||
# Make Sonarr do an update check on start to avoid possible Sonarr | ||
# downgrade when synocommunity package is updated | ||
touch "${SONARR_CONFIG_DIR}/update_required" | ||
|
||
if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then | ||
set_unix_permissions "${CONFIG_DIR}" | ||
fi | ||
} | ||
|
||
service_preupgrade () | ||
{ | ||
if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -ge 7 ]; then | ||
# ensure config is in @appdata folder | ||
if [ -d "${LEGACY_CONFIG_DIR}" ]; then | ||
if [ "$(realpath "${LEGACY_CONFIG_DIR}")" != "$(realpath "${CONFIG_DIR}")" ]; then | ||
echo "Move ${LEGACY_CONFIG_DIR} to ${CONFIG_DIR}" | ||
mv "${LEGACY_CONFIG_DIR}" "${CONFIG_DIR}" 2>&1 | ||
fi | ||
fi | ||
fi | ||
|
||
# never update Sonarr distribution, use internal updater only | ||
[ -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" ] && rm -rf "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" | ||
echo "Backup existing distribution to ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" | ||
mkdir -p "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" 2>&1 | ||
rsync -aX "${SYNOPKG_PKGDEST}/share" "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/" 2>&1 | ||
} | ||
|
||
service_postupgrade () | ||
{ | ||
# restore Sonarr distribution | ||
if [ -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share" ]; then | ||
echo "Restore previous distribution from ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" | ||
rm -rf "${SYNOPKG_PKGDEST}/share/Sonarr/bin" 2>&1 | ||
# prevent overwrite of updated package_info | ||
rsync -aX --exclude=package_info "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share/" "${SYNOPKG_PKGDEST}/share" 2>&1 | ||
fi | ||
|
||
if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then | ||
set_unix_permissions "${SYNOPKG_PKGDEST}/share" | ||
# If backup was created before new-style packages | ||
# new updates/backups will fail due to permissions (see #3185) | ||
if [ -d "/tmp/nzbdrone_backup" ] || [ -d "/tmp/nzbdrone_update" ] || [ -d "/tmp/sonarr_backup" ] || [ -d "/tmp/sonarr_update" ]; then | ||
set_unix_permissions "/tmp/nzbdrone_backup" | ||
set_unix_permissions "/tmp/nzbdrone_update" | ||
set_unix_permissions "/tmp/sonarr_backup" | ||
set_unix_permissions "/tmp/sonarr_update" | ||
fi | ||
fi | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[{ | ||
"step_title": "Updating Sonarr", | ||
"items": [{ | ||
"desc": "The first time Sonarr is started it might take a few moments for the interface to become available!<br><br>Keep Sonarr up-to-date by using Sonarr's built-in updater.<br>Navigate to System>Updates in the Sonarr UI." | ||
}] | ||
},{ | ||
"step_title": "Attention! DSM Permissions", | ||
"items": [{ | ||
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM." | ||
}] | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[{ | ||
"step_title": "Mettre à jour Sonarr", | ||
"items": [{ | ||
"desc": "Au premier démarrage de Sonarr cela peut prendre un moment avant que l'interface ne soit disponible !<br><br>Garder Sonarr à jour en utilisant System>Updates dans l'interface Sonarr." | ||
}] | ||
},{ | ||
"step_title": "Attention! Permissions DSM", | ||
"items": [{ | ||
"desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM." | ||
}] | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[{ | ||
"step_title": "RECOMMENDATION: Download A Backup Before Upgrading", | ||
"items": [{ | ||
"desc": "<strong style='color:red'>IMPORTANT:</strong> This update is an upgrade to Sonarr v3. We suggest that you download a manual backup as a precautionary measure before installing this update.<br><br>You can download a backup via Sonarr's built-in web-interface.<br>To do this, navigate to <b>System>Backup</b> in the Sonarr UI.<br><br>Create a backup and then download a copy of that backup before installing this upgrade." | ||
}] | ||
},{ | ||
"step_title": "Updating Sonarr", | ||
"items": [{ | ||
"desc": "Keep Sonarr up-to-date by using Sonarr's built-in updater.<br>Navigate to <b>System>Updates</b> in the Sonarr UI." | ||
}] | ||
},{ | ||
"step_title": "Attention! DSM Permissions", | ||
"items": [{ | ||
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM." | ||
},{ | ||
"desc": "<strong style='color:red'>NOTE:</strong> The package upgrade will try to set the correct permissions on your folders. If you get permission errors within Sonarr, manually set Read/Write permissions for the 'sc-download' group on the reported folders using File Station." | ||
}] | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[{ | ||
"step_title": "RECOMMENDATION: Télécharger une sauvegarde avant la mise à niveau", | ||
"items": [{ | ||
"desc": "<strong style='color:red'>IMPORTANT:</strong> Cette mise à jour est une mise à niveau vers Sonarr v3. Nous vous suggérons de télécharger une sauvegarde manuelle par mesure de précaution avant d'installer cette mise à jour.<br><br>Vous pouvez télécharger une sauvegarde via l'interface Web intégrée de Sonarr.<br>Pour ce faire, accédez à <b>System>Backup</b> dans l'interface utilisateur Sonarr.<br><br>Créez une sauvegarde, puis téléchargez une copie de cette sauvegarde avant d'installer cette mise à niveau." | ||
}] | ||
},{ | ||
"step_title": "Mettre à jour Sonarr", | ||
"items": [{ | ||
"desc": "Garder Sonarr à jour en utilisant <b>System>Updates</b> dans l'interface Sonarr." | ||
}] | ||
},{ | ||
"step_title": "Attention! Permissions DSM", | ||
"items": [{ | ||
"desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM." | ||
},{ | ||
"desc": "<strong style='color:red'>NOTE:</strong> La mise à jour de l'application va tenter de corriger les permissions des répertoires. En cas d'erreur de permission dans Sonarr, donner les droits de Lecture/Ecriture au groupe 'sc-download' sur les répertoires mentionnés depuis File Station." | ||
}] | ||
}] |