Created
January 17, 2022 06:24
-
-
Save eh8/2a29b6d423438bfb522a8c39eca36800 to your computer and use it in GitHub Desktop.
Stopgap update for home-assistant [community]
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
[Unit] | |
Description=Home assistant | |
After=network.target | |
[Service] | |
Restart=on-failure | |
User=hass | |
Group=hass | |
DynamicUser=true | |
LogsDirectory=hass | |
StateDirectory=hass | |
WorkingDirectory=/var/lib/hass | |
Environment=HOME=/var/lib/hass | |
ExecStart=/usr/bin/hass \ | |
--config /var/lib/hass/ \ | |
--log-file /var/log/hass/home-assistant.log \ | |
--log-rotate-days 1 \ | |
--runner | |
RestartForceExitStatus=100 | |
AmbientCapabilities= | |
CapabilityBoundingSet= | |
LockPersonality=true | |
ProtectControlGroups=true | |
ProtectKernelModules=true | |
ProtectKernelTunables=true | |
[Install] | |
WantedBy=multi-user.target |
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
# Maintainer: Maxime Gauduin <[email protected]> | |
# Contributor: Ethan Skinner <[email protected]> | |
# Contributor: Grégoire Seux <[email protected]> | |
# Contributor: Dean Galvin <[email protected]> | |
# Contributor: NicoHood <[email protected]> | |
pkgname=home-assistant | |
pkgdesc='Open source home automation that puts local control and privacy first' | |
pkgver=2021.12.9 | |
pkgrel=1 | |
arch=(any) | |
url=https://home-assistant.io/ | |
license=(APACHE) | |
depends=( | |
gcc | |
python-aiohttp | |
python-aiohttp-cors | |
python-astral | |
python-async-timeout | |
python-atomicwrites | |
python-attrs | |
python-awesomeversion | |
python-bcrypt | |
python-certifi | |
python-ciso8601 | |
python-cryptography | |
python-defusedxml | |
python-httpx | |
python-jinja | |
python-mutagen | |
python-pillow | |
python-pip | |
python-pyjwt | |
python-pytz | |
python-requests | |
python-ruamel-yaml | |
python-slugify | |
python-sqlalchemy | |
python-voluptuous | |
python-voluptuous-serialize | |
python-yaml | |
python-yarl | |
python-zeroconf | |
) | |
makedepends=( | |
git | |
python-setuptools | |
) | |
optdepends=( | |
'net-tools: Nmap host discovery' | |
'openzwave: Z-Wave integration' | |
'python-dtlssocket: Ikea Tradfri integration' | |
'python-lxml: Meteo France integration' | |
) | |
_tag=b6f432645d7bc6b4947a20afa28647eb1515e4f8 | |
source=( | |
git+https://github.com/home-assistant/home-assistant.git#tag=${_tag} | |
home-assistant.service | |
) | |
b2sums=('SKIP' | |
'e4104493cb70ef0e07cb046c61188d126d47dacdfb55d989321510a326a1477124b109eefa465bd60190196cb08f8aa6b61fde6dd7b608117d0a9bf6b46db525') | |
pkgver() { | |
cd home-assistant | |
git describe --tags | |
} | |
prepare() { | |
cd home-assistant | |
# lift hard dep constraints, we'll deal with breaking changes ourselves | |
sed 's/==/>=/g' -i requirements.txt setup.py homeassistant/package_constraints.txt | |
# allow pip >= 20.3 to be used | |
sed 's/,<20.3//g' -i requirements.txt setup.py homeassistant/package_constraints.txt | |
# remove python-yaml restriction | |
sed 's/pyyaml>=6.0//g' -i requirements.txt setup.py homeassistant/package_constraints.txt | |
} | |
build() { | |
cd home-assistant | |
python setup.py build | |
} | |
package() { | |
cd home-assistant | |
python setup.py install --root="${pkgdir}" --prefix=/usr --optimize=1 --skip-build | |
install -Dm 644 ../home-assistant.service -t "${pkgdir}"/usr/lib/systemd/system/ | |
} | |
# vim: ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment