Skip to content

Commit

Permalink
Switch sickchill to use a pypi based install to match other distribut…
Browse files Browse the repository at this point in the history
…ions

Signed-off-by: miigotu <miigotu@gmail.com>
  • Loading branch information
miigotu committed Sep 14, 2022
1 parent e850b6a commit c0b3695
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 54 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ toolkit/*/work*
local.mk
*.DS_Store
*~

# PyCharm project settings
.idea
29 changes: 0 additions & 29 deletions cross/sickchill/Makefile

This file was deleted.

2 changes: 0 additions & 2 deletions cross/sickchill/PLIST

This file was deleted.

3 changes: 0 additions & 3 deletions cross/sickchill/digests

This file was deleted.

3 changes: 0 additions & 3 deletions spk/sickchill/BROKEN

This file was deleted.

6 changes: 3 additions & 3 deletions spk/sickchill/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = sickchill
SPK_VERS = 20211110
SPK_REV = 5
SPK_VERS = 20220914
SPK_REV = 6
SPK_ICON = src/sickchill.png

BUILD_DEPENDS = cross/python310
Expand All @@ -21,7 +21,7 @@ MAINTAINER = miigotu
DESCRIPTION = Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
STARTABLE = yes
DISPLAY_NAME = SickChill
CHANGELOG = "1. Migration to Python 3.10<br/>2. SickChill environment fix<br/>3. Added DSM7 Support<br/>4. cryptography resolution for armv7"
CHANGELOG = "Switched to a wheel based install, as source and git installs are no longer supported by upstream."

HOMEPAGE = https://sickchill.github.io/
LICENSE = GPLv3+
Expand Down
7 changes: 6 additions & 1 deletion spk/sickchill/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
sickchill==2022.9.14

# Direct dependencies
# automtically downloaded

appdirs==1.4.4
babelfish==0.6.0
beautifulsoup4==4.10.0
Expand Down Expand Up @@ -82,4 +87,4 @@ validators==0.18.2
webencodings==0.5.1
win-inet-pton==1.1.0
xmltodict==0.12.0
zipp==3.6.0
zipp==3.6.0
21 changes: 8 additions & 13 deletions spk/sickchill/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${PATH}"
HOME="${SYNOPKG_PKGVAR}"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python3"
SC_INSTALL_DIR="${SYNOPKG_PKGDEST}/share/SickChill"
SC_BINARY="${SC_INSTALL_DIR}/SickChill.py"
SC_BINARY="${SYNOPKG_PKGDEST}/env/bin/SickChill"
SC_DATA_DIR="${SYNOPKG_PKGVAR}/data"
SC_CFG_FILE="${SC_DATA_DIR}/config.ini"


GROUP="sc-download"

SERVICE_COMMAND="${PYTHON} ${SC_BINARY} --daemon --nolaunch --pidfile ${PID_FILE} --config ${SC_CFG_FILE} --datadir ${SC_DATA_DIR}"
SERVICE_COMMAND="${SC_BINARY} --daemon --nolaunch --pidfile ${PID_FILE} --config ${SC_CFG_FILE} --datadir ${SC_DATA_DIR}"

set_config() {
. ${SYNOPKG_PKGDEST}/share/git_data
Expand All @@ -20,29 +20,24 @@ set_config() {
sed -i "/^\s*web_username\s*=/s/\s*=\s*.*/ = ${wizard_username}/" ${SC_CFG_FILE}
sed -i "/^\s*web_password\s*=/s/\s*=\s*.*/ = ${wizard_password}/" ${SC_CFG_FILE}
fi
# update git commit to sickchill updater
sed -i "/^\s*branch\s*=/s/\s*=\s*.*/ = ${SC_GIT_BRANCH}/" ${SC_CFG_FILE}
sed -i "/^\s*cur_commit_hash\s*=/s/\s*=\s*.*/ = ${SC_GIT_COMMIT_HASH}/" ${SC_CFG_FILE}
sed -i "/^\s*cur_commit_branch\s*=/s/\s*=\s*.*/ = ${SC_GIT_COMMIT_BRANCH}/" ${SC_CFG_FILE}
else
mkdir -p ${SC_DATA_DIR}
cat << EOF > ${SC_CFG_FILE}
[General]
web_username = ${wizard_username}
web_password = ${wizard_password}
branch = ${SC_GIT_BRANCH}
cur_commit_hash = ${SC_GIT_COMMIT_HASH}
cur_commit_branch = ${SC_GIT_COMMIT_BRANCH}
EOF
fi
}

service_postinst() {
# Create a Python virtualenv
separator="===================================================="

echo ${separator}
install_python_virtualenv
# Install the wheels
install_python_wheels --extra-index-url https://wheel-index.linuxserver.io/ubuntu/

echo ${separator}
install_python_wheels

if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then
set_config
Expand Down

0 comments on commit c0b3695

Please sign in to comment.