Files
non-aur-packages/home-assistant/PKGBUILD

95 lines
2.8 KiB
Bash

# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ethan Skinner <aur@etskinner.com>
# Contributor: Grégoire Seux <grego_aur@familleseux.net>
# Contributor: Dean Galvin <deangalvin3@gmail.com>
# Contributor: NicoHood <archlinux@nicohood.de>
pkgname=home-assistant
pkgdesc='Open source home automation that puts local control and privacy first'
pkgver=2021.4.4
pkgrel=1
arch=(any)
url=https://home-assistant.io/
license=(APACHE)
depends=(
gcc
python-aiohttp
python-aiohttp-cors
python-astral
python-async-timeout
python-attrs
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
python-awesomeversion
)
makedepends=(
git
python-setuptools
)
optdepends=(
'net-tools: Nmap host discovery'
'openzwave: Z-Wave integration'
'python-dtlssocket: Ikea Tradfri integration'
'python-lxml: Meteo France integration'
)
source=(
https://github.com/home-assistant/core/archive/refs/tags/$pkgver.tar.gz
home-assistant.service
home-assistant-astral2.2.patch
)
b2sums=('2956189043c794015a4e103fe16a93daaa6e5d4b4dcd9c464a77b14205ebf39d4d020a106a100931f4ba035d3081572360c6c28c8e8fca1453e44a3dcb73780e'
'0df7bbfdac09e37294ac27567e677855c72d13be3aefbd23e0a8f101cf2148302affbe9b6b586b893f77fc990f665d7b95f4916583680c06abd8f74b5cdf3da9'
'96260b3a42a1a5192ec4d701dbec0a1a6c2465337c3b450a22601144c2ef1a6bd616b8192ab100e36d7fa87f986464c723b3d136789132f78cb860980ea2f4bb')
prepare() {
cd core-$pkgver
patch -Np1 -i ../home-assistant-astral2.2.patch
# get scapy from git to avoid Python issue 42580
# sed 's|scapy==2.4.4|scapy @ git+https://github.com/secdev/scapy.git@46fa40fde4049ad7770481f8806c59640df24059|g' -i requirements_all.txt
# 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
# allow aiohttp >= 3.7.4 to be used
sed 's/3.7.4.post0/3.7.4/g' -i requirements.txt setup.py homeassistant/package_constraints.txt
# allow httpx >= 0.16.1 to be used
sed 's/0.17.1/0.16.1/g' -i requirements.txt setup.py homeassistant/package_constraints.txt
}
build() {
cd core-$pkgver
python setup.py build
}
package() {
cd core-$pkgver
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: