From 603ff88b95efa9e5a952f0fc52ef1f645c1c5cc0 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Wed, 23 Dec 2020 02:35:30 +0300 Subject: [PATCH] www/py-home-assistant-frontend, www/py-homeassistant, devel/py-hass-nabucasa, devel/py-snitun, devel/py-netdisco, devel/py-voluptuous-serialize: add Home Assistant Private patch. --- GIDs | 2 +- UIDs | 2 +- devel/py-hass-nabucasa/Makefile | 30 +++++ devel/py-hass-nabucasa/distinfo | 3 + devel/py-hass-nabucasa/pkg-descr | 3 + devel/py-netdisco/Makefile | 19 ++++ devel/py-netdisco/distinfo | 3 + devel/py-netdisco/pkg-descr | 15 +++ devel/py-snitun/Makefile | 19 ++++ devel/py-snitun/distinfo | 3 + devel/py-snitun/pkg-descr | 3 + devel/py-voluptuous-serialize/Makefile | 21 ++++ devel/py-voluptuous-serialize/distinfo | 3 + devel/py-voluptuous-serialize/pkg-descr | 4 + www/py-home-assistant-frontend/Makefile | 18 +++ www/py-home-assistant-frontend/distinfo | 3 + www/py-home-assistant-frontend/pkg-descr | 5 + www/py-homeassistant/Makefile | 116 ++++++++++++++++++++ www/py-homeassistant/distinfo | 3 + www/py-homeassistant/files/homeassistant.in | 42 +++++++ www/py-homeassistant/pkg-descr | 5 + www/py-homeassistant/pkg-message | 12 ++ 22 files changed, 332 insertions(+), 2 deletions(-) create mode 100644 devel/py-hass-nabucasa/Makefile create mode 100644 devel/py-hass-nabucasa/distinfo create mode 100644 devel/py-hass-nabucasa/pkg-descr create mode 100644 devel/py-netdisco/Makefile create mode 100644 devel/py-netdisco/distinfo create mode 100644 devel/py-netdisco/pkg-descr create mode 100644 devel/py-snitun/Makefile create mode 100644 devel/py-snitun/distinfo create mode 100644 devel/py-snitun/pkg-descr create mode 100644 devel/py-voluptuous-serialize/Makefile create mode 100644 devel/py-voluptuous-serialize/distinfo create mode 100644 devel/py-voluptuous-serialize/pkg-descr create mode 100644 www/py-home-assistant-frontend/Makefile create mode 100644 www/py-home-assistant-frontend/distinfo create mode 100644 www/py-home-assistant-frontend/pkg-descr create mode 100644 www/py-homeassistant/Makefile create mode 100644 www/py-homeassistant/distinfo create mode 100644 www/py-homeassistant/files/homeassistant.in create mode 100644 www/py-homeassistant/pkg-descr create mode 100644 www/py-homeassistant/pkg-message diff --git a/GIDs b/GIDs index f1359bc682d4..746adf332587 100644 --- a/GIDs +++ b/GIDs @@ -510,7 +510,7 @@ polkitd:*:565: # free: 567 # free: 568 # free: 569 -# free: 570 +homeassistant:*:570: # free: 571 # free: 572 # free: 573 diff --git a/UIDs b/UIDs index 815a01dad862..09f72fdbf178 100644 --- a/UIDs +++ b/UIDs @@ -515,7 +515,7 @@ polkitd:*:565:565::0:0:Polkit Daemon User:/var/empty:/usr/sbin/nologin # free: 567 # free: 568 # free: 569 -# free: 570 +homeassistant:*:570:570::0:0:Home Assistant:/var/db/homeassistant:/usr/sbin/nologin # free: 571 # free: 572 # free: 573 diff --git a/devel/py-hass-nabucasa/Makefile b/devel/py-hass-nabucasa/Makefile new file mode 100644 index 000000000000..274bec08b8fb --- /dev/null +++ b/devel/py-hass-nabucasa/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +PORTNAME= hass-nabucasa +PORTVERSION= 0.38.0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= Home Assistant cloud integration by Nabu Casa, Inc. + +LICENSE= GPLv3 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycognito>0:devel/py-pycognito@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}snitun>0:devel/py-snitun@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}acme>0:security/py-acme@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}aiohttp>0:www/py-aiohttp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}atomicwrites>0:devel/py-atomicwrites@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= distutils autoplist + +post-patch: + @${REINPLACE_CMD} -e 's|==|>=|g' \ + ${WRKSRC}/setup.py + +.include diff --git a/devel/py-hass-nabucasa/distinfo b/devel/py-hass-nabucasa/distinfo new file mode 100644 index 000000000000..20e0a0ec7e8c --- /dev/null +++ b/devel/py-hass-nabucasa/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606003979 +SHA256 (hass-nabucasa-0.38.0.tar.gz) = cf298f5600b3c6908ee9c767394d9b0ba473afe02658263f391d4f60309c3956 +SIZE (hass-nabucasa-0.38.0.tar.gz) = 22367 diff --git a/devel/py-hass-nabucasa/pkg-descr b/devel/py-hass-nabucasa/pkg-descr new file mode 100644 index 000000000000..7c40f69dd0e4 --- /dev/null +++ b/devel/py-hass-nabucasa/pkg-descr @@ -0,0 +1,3 @@ +Cloud integration in Home Assistant + +WWW: https://github.com/NabuCasa/hass-nabucasa diff --git a/devel/py-netdisco/Makefile b/devel/py-netdisco/Makefile new file mode 100644 index 000000000000..27b8e044f40b --- /dev/null +++ b/devel/py-netdisco/Makefile @@ -0,0 +1,19 @@ +PORTNAME= netdisco +PORTVERSION= 2.8.2 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= Discover devices on your local network + +LICENSE= APACHE20 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}voluptuous>0:devel/py-voluptuous@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +.include diff --git a/devel/py-netdisco/distinfo b/devel/py-netdisco/distinfo new file mode 100644 index 000000000000..652be07013ba --- /dev/null +++ b/devel/py-netdisco/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1605997683 +SHA256 (netdisco-2.8.2.tar.gz) = dcaabf83b204282aacfb213b18799eb7af2d5a6defe529487bbd0548036392fe +SIZE (netdisco-2.8.2.tar.gz) = 30948 diff --git a/devel/py-netdisco/pkg-descr b/devel/py-netdisco/pkg-descr new file mode 100644 index 000000000000..c7cb0664854e --- /dev/null +++ b/devel/py-netdisco/pkg-descr @@ -0,0 +1,15 @@ +NetDisco is a Python 3 library to discover local devices and services. +It allows to scan on demand or offer a service that will scan the +network in the background in a set interval. + +Current methods of scanning: + - mDNS (includes Chromecast, Homekit) + - uPnP + - Plex Media Server using Good Day Mate protocol + - Logitech Media Server discovery protocol + - Daikin discovery protocol + - Web OS discovery protocol + +It is the library that powers the device discovery within Home Assistant. + +WWW: https://github.com/home-assistant/netdisco diff --git a/devel/py-snitun/Makefile b/devel/py-snitun/Makefile new file mode 100644 index 000000000000..314329ea9cee --- /dev/null +++ b/devel/py-snitun/Makefile @@ -0,0 +1,19 @@ +PORTNAME= snitun +PORTVERSION= 0.20 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= SNI proxy with TCP multiplexer + +LICENSE= GPLv3 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}async_timeout>0:devel/py-async_timeout@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} + +USES= python:3.5+ +USE_PYTHON= distutils autoplist + +.include diff --git a/devel/py-snitun/distinfo b/devel/py-snitun/distinfo new file mode 100644 index 000000000000..ddefc8f41891 --- /dev/null +++ b/devel/py-snitun/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606003824 +SHA256 (snitun-0.20.tar.gz) = c74f4ff82f8e106859652d0f7207e0533137742ab300693198909b37c097c27b +SIZE (snitun-0.20.tar.gz) = 13347 diff --git a/devel/py-snitun/pkg-descr b/devel/py-snitun/pkg-descr new file mode 100644 index 000000000000..f5991c3931d7 --- /dev/null +++ b/devel/py-snitun/pkg-descr @@ -0,0 +1,3 @@ +End-to-End encryption with SNI proxy on top of a TCP multiplexer + +WWW: https://github.com/NabuCasa/snitun diff --git a/devel/py-voluptuous-serialize/Makefile b/devel/py-voluptuous-serialize/Makefile new file mode 100644 index 000000000000..13f62d9c8750 --- /dev/null +++ b/devel/py-voluptuous-serialize/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= voluptuous-serialize +PORTVERSION= 2.4.0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= Convert Voluptuous schemas to dictionaries so they can be serialized + +LICENSE= APACHE20 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}voluptuous>0:devel/py-voluptuous@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +.include diff --git a/devel/py-voluptuous-serialize/distinfo b/devel/py-voluptuous-serialize/distinfo new file mode 100644 index 000000000000..4d9de5eeec78 --- /dev/null +++ b/devel/py-voluptuous-serialize/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1605992840 +SHA256 (voluptuous-serialize-2.4.0.tar.gz) = c6ba17cb0301c18e8b955d89b85fa4aa05c05c80ab1e4873810900f757dceae4 +SIZE (voluptuous-serialize-2.4.0.tar.gz) = 3401 diff --git a/devel/py-voluptuous-serialize/pkg-descr b/devel/py-voluptuous-serialize/pkg-descr new file mode 100644 index 000000000000..63fd9e2f8e20 --- /dev/null +++ b/devel/py-voluptuous-serialize/pkg-descr @@ -0,0 +1,4 @@ +Voluptuous Serialize +Convert Voluptuous schemas to dictionaries so they can be serialized. + +WWW: https://github.com/home-assistant-libs/voluptuous-serialize diff --git a/www/py-home-assistant-frontend/Makefile b/www/py-home-assistant-frontend/Makefile new file mode 100644 index 000000000000..163e86bb19ed --- /dev/null +++ b/www/py-home-assistant-frontend/Makefile @@ -0,0 +1,18 @@ +PORTNAME= home-assistant-frontend +PORTVERSION= 20210603.0 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= The Home Assistant frontend + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include diff --git a/www/py-home-assistant-frontend/distinfo b/www/py-home-assistant-frontend/distinfo new file mode 100644 index 000000000000..3a4c4a7f3532 --- /dev/null +++ b/www/py-home-assistant-frontend/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1624872587 +SHA256 (home-assistant-frontend-20210603.0.tar.gz) = d9485bb5ac4470e903f59e60f6066cf908ee54b5d918211c98aa3146d204631c +SIZE (home-assistant-frontend-20210603.0.tar.gz) = 24529831 diff --git a/www/py-home-assistant-frontend/pkg-descr b/www/py-home-assistant-frontend/pkg-descr new file mode 100644 index 000000000000..6cdc2a8f0358 --- /dev/null +++ b/www/py-home-assistant-frontend/pkg-descr @@ -0,0 +1,5 @@ +Open source home automation that puts local control and privacy first. +Powered by a worldwide community of tinkerers and DIY enthusiasts. +Perfect to run on a Raspberry Pi or a local server. + +WWW: https://www.home-assistant.io/ diff --git a/www/py-homeassistant/Makefile b/www/py-homeassistant/Makefile new file mode 100644 index 000000000000..e39518051fb7 --- /dev/null +++ b/www/py-homeassistant/Makefile @@ -0,0 +1,116 @@ +PORTNAME= homeassistant +# Jinja2 3xxx required after this release +PORTVERSION= 2021.5.5 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rozhuk.im@gmail.com +COMMENT= Open-source home automation platform running on Python 3 + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +# homeassistant/package_constraints.txt +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp_cors>=0.7.0:www/py-aiohttp_cors@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}aiohttp>=3.7.4.p0:www/py-aiohttp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}astral>=2.2:astro/py-astral@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}async_timeout>=3.0.1:devel/py-async_timeout@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}attrs>=21.2.0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}awesomeversion>=21.4.0:devel/py-awesomeversion@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}backports.zoneinfo>=0.2.1:devel/py-backports.zoneinfo@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}bcrypt>=3.1.7:security/py-bcrypt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}certifi>=2021.5.30:security/py-certifi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ciso8601>=2.1.3:devel/py-ciso8601@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cryptography>=3.3.2:security/py-cryptography@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}defusedxml>=0.6.0:devel/py-defusedxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}distro>=1.5.0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}emoji>=0.5.0:misc/py-emoji@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}grpcio>=1.31.0:devel/py-grpcio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}hass-nabucasa>=0.38.0:devel/py-hass-nabucasa@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}home-assistant-frontend>=20210517.0:www/py-home-assistant-frontend@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}httplib2>=0.19.0:www/py-httplib2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}httpx>=0.18.0:www/py-httpx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.6.0:devel/py-importlib-metadata@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.11.2:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}netdisco>=2.8.2:devel/py-netdisco@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}paho-mqtt>=1.5.0:net/py-paho-mqtt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=8.1.2:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pip>=20.3.4:devel/py-pip@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.6.6:security/py-pycryptodome@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyjwt>=1.7.1:www/py-pyjwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pynacl>=1.3.0:security/py-pynacl@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-slugify>=4.0.1:textproc/py-python-slugify@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>=2020.1:devel/py-pytz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.25.1:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.100:devel/py-ruamel.yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=1.4.10:databases/py-sqlalchemy14@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}urllib3>=1.24.3:net/py-urllib3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}voluptuous-serialize>=2.4.0:devel/py-voluptuous-serialize@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}voluptuous>=0.12.0:devel/py-voluptuous@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>=5.4.1:devel/py-yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yarl>=1.6.3:www/py-yarl@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zeroconf>=0.28.5:net/py-zeroconf@${PY_FLAVOR} + +USES= python:3.8+ +USE_PYTHON= autoplist concurrent distutils +USE_RC_SUBR= homeassistant + +USERS= homeassistant +GROUPS= homeassistant + +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} + +NO_ARCH= yes + +OPTIONS_DEFINE= MQTT_MOSQ +OPTIONS_DEFAULT=MQTT_MOSQ + +MQTT_MOSQ_DESC= Mosquitto MQTT broker +MQTT_MOSQ_RUN_DEPENDS= mosquitto>=0:net/mosquitto + + +post-patch: +.for __RUN_DEPEND in ${RUN_DEPENDS} + @${ECHO} -n "${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}: " + @${GREP} -E "^${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)" \ + ${WRKSRC}/homeassistant/package_constraints.txt | \ + ${SED} -E "s/${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)([.0-9]*)/\2/g" | \ + ${TR} -cd '[:print:]' + @${ECHO} " -> ${__RUN_DEPEND:C/.*(>|<|==|>=|<=)(.*)[:].*/\2/}" + + @${REINPLACE_CMD} -E \ + -e "s/(^|\")${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)[.0-9]*/\1${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}>=${__RUN_DEPEND:C/.*(>|<|==|>=|<=)(.*)[:].*/\2/}/g" \ + ${WRKSRC}/setup.py \ + ${WRKSRC}/homeassistant/package_constraints.txt \ + ${WRKSRC}/homeassistant/auth/mfa_modules/*.py \ + ${WRKSRC}/homeassistant/scripts/*.py \ + ${WRKSRC}/homeassistant/components/*/manifest.json +.endfor +# Port name did not match python packet name. +.for __RUN_DEPEND in jinja2 PyJWT pyyaml PyNaCl sqlalchemy + @${ECHO} -n "${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}: " + @${GREP} -E "^${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)" \ + ${WRKSRC}/homeassistant/package_constraints.txt | \ + ${SED} -E "s/${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)([.0-9]*)/\2/g" | \ + ${TR} -cd '[:print:]' + @${ECHO} " -> ${__RUN_DEPEND:C/.*(>|<|==|>=|<=)(.*)[:].*/\2/} >=0" + + @${REINPLACE_CMD} -E \ + -e 's/(^|\")${__RUN_DEPEND}(>|<|==|>=|<=)[.0-9]*/\1${__RUN_DEPEND}>=0/g' \ + ${WRKSRC}/setup.py \ + ${WRKSRC}/homeassistant/package_constraints.txt \ + ${WRKSRC}/homeassistant/auth/mfa_modules/*.py \ + ${WRKSRC}/homeassistant/scripts/*.py \ + ${WRKSRC}/homeassistant/components/*/manifest.json +.endfor + @${REINPLACE_CMD} -E "s/(^|\")pip(>|<|==|>=|<=)([.0-9]*),(>|<|==|>=|<=)([.0-9]*)/\1pip\2\3/" \ + ${WRKSRC}/setup.py \ + ${WRKSRC}/homeassistant/package_constraints.txt + @${FIND} ${WRKSRC} -name '*.bak' -name '*.orig' -delete + +post-stage: + @${MKDIR} ${STAGEDIR}/var/db/homeassistant + @${ECHO_CMD} "@dir(homeassistant,homeassistant,) /var/db/homeassistant" >> ${TMPPLIST} + +.include diff --git a/www/py-homeassistant/distinfo b/www/py-homeassistant/distinfo new file mode 100644 index 000000000000..69d34b680282 --- /dev/null +++ b/www/py-homeassistant/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1624726914 +SHA256 (homeassistant-2021.5.5.tar.gz) = 135bc9ebef7c7c6b7371306a91389b6a8acdecbf9bba6044dca2fa071abb4a62 +SIZE (homeassistant-2021.5.5.tar.gz) = 6568616 diff --git a/www/py-homeassistant/files/homeassistant.in b/www/py-homeassistant/files/homeassistant.in new file mode 100644 index 000000000000..6290e4a082b0 --- /dev/null +++ b/www/py-homeassistant/files/homeassistant.in @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: homeassistant +# REQUIRE: NETWORKING SYSLOG +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable homeassistant: +# +#homeassistant_enable="YES" + +. /etc/rc.subr + +name="homeassistant" +rcvar="homeassistant_enable" + +load_rc_config $name + +: ${homeassistant_enable:="NO"} +: ${homeassistant_user:="homeassistant"} +: ${homeassistant_group:="homeassistant"} +: ${homeassistant_config_dir:="/var/db/homeassistant"} +: ${homeassistant_log_file:="/var/log/home-assistant.log"} +: ${homeassistant_log_days:="7"} + + +pidfile="/var/run/${name}.pid" +procname="%%PYTHON_CMD%%" +command="%%PREFIX%%/bin/hass" +command_args="--daemon --log-no-color --log-file \"${homeassistant_log_file}\" --log-rotate-days \"${homeassistant_log_days}\" --config \"${homeassistant_config_dir}\" --pid-file \"${pidfile}\"" + +start_precmd="homeassistant_precmd" + +homeassistant_precmd() { + install -d -o ${homeassistant_user} -g ${homeassistant_group} -m 0700 ${homeassistant_config_dir} + install -o ${homeassistant_user} -g ${homeassistant_group} -m 0600 /dev/null ${homeassistant_log_file} + su -m ${homeassistant_user} -c "${command} --config \"${homeassistant_config_dir}\" --script ensure_config" + su -m ${homeassistant_user} -c "${command} --config \"${homeassistant_config_dir}\" --script check_config" +} + +run_rc_command "$1" diff --git a/www/py-homeassistant/pkg-descr b/www/py-homeassistant/pkg-descr new file mode 100644 index 000000000000..6cdc2a8f0358 --- /dev/null +++ b/www/py-homeassistant/pkg-descr @@ -0,0 +1,5 @@ +Open source home automation that puts local control and privacy first. +Powered by a worldwide community of tinkerers and DIY enthusiasts. +Perfect to run on a Raspberry Pi or a local server. + +WWW: https://www.home-assistant.io/ diff --git a/www/py-homeassistant/pkg-message b/www/py-homeassistant/pkg-message new file mode 100644 index 000000000000..56729b15d1d6 --- /dev/null +++ b/www/py-homeassistant/pkg-message @@ -0,0 +1,12 @@ +[ +{ type: install + message: <