diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index af55b02a0bb9..89b4e2298b75 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -13,7 +13,7 @@ UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) $(ARMv7L_ARCHS) MAINTAINER = hgy59 DESCRIPTION = "Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control." DISPLAY_NAME = Home Assistant Core -CHANGELOG = "1. Update homeassistant to 2022.10.5.
2. Update Python to 3.10.

REMARKS: Only arch specific python modules are included in the package. Other modules are downloaded at installation time." +CHANGELOG = "1. Update homeassistant to 2022.10.5.
2. Update Python to 3.10.
3. Add requirements-custom.txt where a user can add manually installed python modules, that will be reinstalled on package updates.

REMARKS: Only arch specific python modules are included in the package. Other modules are downloaded at installation time." STARTABLE = yes HOMEPAGE = https://www.home-assistant.io/ @@ -106,14 +106,17 @@ endif # [pycryptodomex] ifeq ($(call version_ge, ${TC_GCC}, 4.9),1) +WHEELS_CFLAGS += [pycryptodome] -std=c11 WHEELS_CFLAGS += [pycryptodomex] -std=c11 else +WHEELS_CFLAGS += [pycryptodome] -std=c99 WHEELS_CFLAGS += [pycryptodomex] -std=c99 endif .PHONY: homeassistant_extra_install homeassistant_extra_install: - @install -m 755 -d $(STAGING_DIR)/share + @install -m 755 -d $(STAGING_DIR)/share $(STAGING_DIR)/var @install -m 644 src/postinst_components_requirements.txt $(STAGING_DIR)/share/ @install -m 644 src/hacs.tar.gz $(STAGING_DIR)/share/ + @install -m 644 src/requirements-custom.txt $(STAGING_DIR)/var/ diff --git a/spk/homeassistant/src/requirements-abi3.txt b/spk/homeassistant/src/requirements-abi3.txt index df45027b0f95..1e80500f6ad7 100644 --- a/spk/homeassistant/src/requirements-abi3.txt +++ b/spk/homeassistant/src/requirements-abi3.txt @@ -1 +1,2 @@ +pycryptodome==3.15.0 pycryptodomex==3.15.0 diff --git a/spk/homeassistant/src/requirements-crossenv.txt b/spk/homeassistant/src/requirements-crossenv.txt index f60b66990dda..47bd540e8ce5 100644 --- a/spk/homeassistant/src/requirements-crossenv.txt +++ b/spk/homeassistant/src/requirements-crossenv.txt @@ -122,5 +122,6 @@ guppy3==3.1.2 psutil==5.9.4 Pillow==9.2.0 pyitachip2ir==0.0.7 +websockets==10.4 # DTLSSocket==0.1.12 ==> cross/dtlssocket diff --git a/spk/homeassistant/src/requirements-custom.txt b/spk/homeassistant/src/requirements-custom.txt new file mode 100644 index 000000000000..0e5c8334fdbf --- /dev/null +++ b/spk/homeassistant/src/requirements-custom.txt @@ -0,0 +1,14 @@ +# Home Assistant core +# requirements-custom.txt +# +# This file is for additional python modules that will be installed on a package update. +# +# For example: +# When you manually installed a python module with pip, you can add here a line for each module +# like "module==version" (or "module>=version", or ...) +# and it will be installed by the installer on the next package update. +# +# This is experimental and has limitations: +# - probably your custom modules will need updated versions, so you can try to omit the version +# - you can get unresolvable conflicts with other python modules +# diff --git a/spk/homeassistant/src/service-setup.sh b/spk/homeassistant/src/service-setup.sh index 05519e876d33..4a09a46fc2b8 100644 --- a/spk/homeassistant/src/service-setup.sh +++ b/spk/homeassistant/src/service-setup.sh @@ -71,6 +71,11 @@ service_postinst () echo "Install packages for homeassistant.components from index" pip install --disable-pip-version-check --no-input --cache-dir ${PIP_CACHE_DIR} --requirement ${SYNOPKG_PKGDEST}/share/postinst_components_requirements.txt + if [ -e ${SYNOPKG_PKGVAR}/requirements-custom.txt ]; then + echo ${separator} + echo "Install custom packages from index" + pip install --disable-pip-version-check --no-input --cache-dir ${PIP_CACHE_DIR} --requirement ${SYNOPKG_PKGVAR}/requirements-custom.txt + fi if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then # ensure package user has access to the virtual env packages, installed as root