summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoretckeeper2022-05-19 16:19:21 +0200
committeretckeeper2022-05-19 16:19:21 +0200
commitcec5d8f984085c7ee43296f5a4275beaf0e8376c (patch)
treed0b5f4b3f28aae2ff1df14372913fa48339cdb20
parente721c95caeaaba179520db8f5fab35d9264abe7e (diff)
downloadaur-cec5d8f984085c7ee43296f5a4275beaf0e8376c.tar.gz
fixed ExecStartPre vs ExecStart copypaste typo
split the python dir cleaning up script to multiple lines added provides home-assistant for compatibility to third party packages
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD5
-rw-r--r--hass-update.service9
3 files changed, 13 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e51bef817d3..e1793ecaee8f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = home-assistant-service-pip
pkgdesc = Self installing package of Home Assistant using pip
- pkgver = 1
+ pkgver = 2
pkgrel = 1
url = https://home-assistant.io/
install = hass.install
@@ -38,6 +38,7 @@ pkgbase = home-assistant-service-pip
optdepends = openzwave: Z-Wave integration
optdepends = python-dtlssocket: Ikea Tradfri integration
optdepends = python-lxml: Meteo France integration
+ provides = home-assistant
backup = etc/hass.env
source = hass.service
source = hass-update.service
@@ -45,7 +46,7 @@ pkgbase = home-assistant-service-pip
source = hass.tmpfiles
source = hass.env
sha256sums = 680ed79423fd66af3201c9eaf08abdbd0aea0ef1e9ca7fd89d182065117a06f6
- sha256sums = 4cc30ae7bc72471c4c918548a1574be82ca75ee0f852eb9602aa1f09566dc715
+ sha256sums = 10c57fb89c0e70abb02adeb11ca276da230dc5e169134f0586a000bb135505e7
sha256sums = ee49a7bb8ce2cf2bb34f53708d205aea4e16c25c1cb9d3925d562286ab499852
sha256sums = ce1491f82b257f915d41f9556636bb2a924d95c8ae6e0e85188c2b15849f82de
sha256sums = 0418c572087bfd0c7946b1cf662619e58c09b4c4972d1e705354fe26b38e4a7c
diff --git a/PKGBUILD b/PKGBUILD
index 4ff008c212ed..aa6bcc10581d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
pkgname=home-assistant-service-pip
_serviceName=hass
pkgdesc='Self installing package of Home Assistant using pip'
-pkgver=1
+pkgver=2
pkgrel=1
arch=('any')
url='https://home-assistant.io/'
@@ -44,12 +44,13 @@ optdepends=(
)
source=("${_serviceName}.service" "${_serviceName}-update.service" "${_serviceName}.sysusers" "${_serviceName}.tmpfiles" "${_serviceName}.env")
sha256sums=('680ed79423fd66af3201c9eaf08abdbd0aea0ef1e9ca7fd89d182065117a06f6'
- '4cc30ae7bc72471c4c918548a1574be82ca75ee0f852eb9602aa1f09566dc715'
+ '10c57fb89c0e70abb02adeb11ca276da230dc5e169134f0586a000bb135505e7'
'ee49a7bb8ce2cf2bb34f53708d205aea4e16c25c1cb9d3925d562286ab499852'
'ce1491f82b257f915d41f9556636bb2a924d95c8ae6e0e85188c2b15849f82de'
'0418c572087bfd0c7946b1cf662619e58c09b4c4972d1e705354fe26b38e4a7c')
backup=("etc/${_serviceName}.env")
install="${_serviceName}.install"
+provides=('home-assistant')
package() {
install -Dvm 644 "${srcdir}/${_serviceName}.service" "${pkgdir}/usr/lib/systemd/system/${_serviceName}.service"
diff --git a/hass-update.service b/hass-update.service
index 7bd0207f192e..faf71d0e442a 100644
--- a/hass-update.service
+++ b/hass-update.service
@@ -13,10 +13,15 @@ EnvironmentFile=-/etc/hass.env
Type=oneshot
# delete old python version libraries in the venv
-ExecStartPre=sh -c 'find $(python -c "import os.path as path; import site; print(path.dirname(path.dirname(site.getusersitepackages())))") -mindepth 1 -type d -path $(python -c "import os.path as path; import site; print(path.basename(path.dirname(path.relpath(site.getusersitepackages(),site.getuserbase()))))") -prune -print0 | xargs --no-run-if-empty -0 rm --verbose --recursive'
+ExecStart=sh -c '\
+find \
+$(python -c "import os.path as path; import site; print(path.dirname(path.dirname(site.getusersitepackages())))") -mindepth 1 -type d \
+-path $(python -c "import os.path as path; import site; print(path.basename(path.dirname(path.relpath(site.getusersitepackages(),site.getuserbase()))))") -prune \
+-print0 \
+| xargs --no-run-if-empty -0 rm --verbose --recursive'
# upgrade home assistant and all its necessary libs
-ExecStartPre=pip install --no-warn-script-location --user --upgrade homeassistant
+ExecStart=pip install --no-warn-script-location --user --upgrade homeassistant
LockPersonality=true
RestrictRealtime=true