git: fa3dcc3ff7db - main - net-mgmt/py-pypowerwall: Update to 0.5.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Jul 2022 15:39:53 UTC
The branch main has been updated by zi: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa3dcc3ff7dbb27c3bd0821ff38c19daacc0d213 commit fa3dcc3ff7dbb27c3bd0821ff38c19daacc0d213 Author: Ryan Steinmetz <zi@FreeBSD.org> AuthorDate: 2022-07-05 15:38:58 +0000 Commit: Ryan Steinmetz <zi@FreeBSD.org> CommitDate: 2022-07-05 15:39:34 +0000 net-mgmt/py-pypowerwall: Update to 0.5.0 --- net-mgmt/py-pypowerwall/Makefile | 18 +++++--- net-mgmt/py-pypowerwall/distinfo | 6 +-- net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in | 50 ++++++++++++++++++++++ net-mgmt/py-pypowerwall/pkg-plist | 13 ++++++ 4 files changed, 77 insertions(+), 10 deletions(-) diff --git a/net-mgmt/py-pypowerwall/Makefile b/net-mgmt/py-pypowerwall/Makefile index 4971dd2d7da8..656c8ac4222f 100644 --- a/net-mgmt/py-pypowerwall/Makefile +++ b/net-mgmt/py-pypowerwall/Makefile @@ -1,7 +1,7 @@ # Created by: Ryan Steinmetz <zi@FreeBSD.org> PORTNAME= pypowerwall -PORTVERSION= 0.4.0 +PORTVERSION= 0.5.0 DISTVERSIONPREFIX= v CATEGORIES= net-mgmt python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,21 +11,25 @@ COMMENT= Python interface for Tesla Powerwall and solar power data LICENSE= MIT -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \ +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.21.0:www/py-requests@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.21.0:www/py-requests@${PY_FLAVOR} -USES= python:3.6+ +USES= python:3.6+ shebangfix USE_PYTHON= autoplist distutils +SHEBANG_FILES= proxy/server.py -PLIST_FILES= ${EXAMPLESDIR}/server.py +USE_RC_SUBR= ${PORTNAME}_proxy USE_GITHUB= yes GH_ACCOUNT= jasonacox post-install: - ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/proxy/server.py ${STAGEDIR}${EXAMPLESDIR} + @${MKDIR} ${STAGEDIR}${DATADIR} + @${RM} ${WRKSRC}/proxy/Dockerfile + (cd ${WRKSRC}/proxy && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}) .include <bsd.port.mk> diff --git a/net-mgmt/py-pypowerwall/distinfo b/net-mgmt/py-pypowerwall/distinfo index 0e31bf58a51d..145a1c16921d 100644 --- a/net-mgmt/py-pypowerwall/distinfo +++ b/net-mgmt/py-pypowerwall/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1656865953 -SHA256 (jasonacox-pypowerwall-v0.4.0_GH0.tar.gz) = 08504bbf53c831eaba8bca585a2958ec8226fb6a64e2e95fa145fca471c9237a -SIZE (jasonacox-pypowerwall-v0.4.0_GH0.tar.gz) = 131316 +TIMESTAMP = 1657029942 +SHA256 (jasonacox-pypowerwall-v0.5.0_GH0.tar.gz) = 94fece6d038523899e23183708b8a7cb3368eb121415a39cd4a5caea7848900f +SIZE (jasonacox-pypowerwall-v0.5.0_GH0.tar.gz) = 185001 diff --git a/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in b/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in new file mode 100644 index 000000000000..63a244323f8f --- /dev/null +++ b/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in @@ -0,0 +1,50 @@ +#!/bin/sh + +# PROVIDE: pypowerwall_proxy +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# pypowerwall_proxy_enable (bool): Set to NO by default. +# Set it to YES to enable pypowerwall_proxy. +# pypowerwall_proxy_user (string): Set user that pypowerwall_proxy will run under +# Default is "nobody". +# pypowerwall_proxy_listen (string): Set IP that pypowerwall_proxy will listen on +# Default is "127.0.0.1". +# pypowerwall_proxy_host (string): Set IP that pypowerwall_proxy will connect to +# Default is "127.0.0.1". +# pypowerwall_proxy_port (string): Set port that pypowerwall_proxy listen on +# Default is "8675". +# pypowerwall_proxy_email (string): Set email that pypowerwall_proxy use to login +# Default is "no@body.com". +# pypowerwall_proxy_password (string): Set password that pypowerwall_proxy use to login +# Default is "". +# pypowerwall_proxy_timezone (string): Set timezone that pypowerwall_proxy will use +# Default is "America/New_York". + +. /etc/rc.subr + +name=pypowerwall_proxy +rcvar=pypowerwall_proxy_enable + +load_rc_config $name + +: ${pypowerwall_proxy_enable:="NO"} +: ${pypowerwall_proxy_username:="nobody"} +: ${pypowerwall_proxy_group:="nobody"} +: ${pypowerwall_proxy_listen:="127.0.0.1"} +: ${pypowerwall_proxy_host:="127.0.0.1"} +: ${pypowerwall_proxy_email:="no@body.com"} +: ${pypowerwall_proxy_timezone:="America/New_York"} +: ${pypowerwall_proxy_password:=""} +: ${pypowerwall_proxy_port:="8675"} + +pidfile=/var/run/pypowerwall_proxy.pid +command="/usr/sbin/daemon" +pypowerwall_proxy_command="%%DATADIR%%/server.py" +command_args="-u ${pypowerwall_proxy_username} -rP ${pidfile} -S -t ${name} -T ${name} /usr/bin/env PW_EMAIL=${pypowerwall_proxy_email} PW_PASSWORD=${pypowerwall_proxy_password} PW_TIMEZONE=${pypowerwall_proxy_timezone} PW_HOST=${pypowerwall_proxy_host} PW_BIND_ADDRESS=${pypowerwall_proxy_listen} PW_PORT=${pypowerwall_proxy_port} ${pypowerwall_proxy_command}" + +load_rc_config $name +run_rc_command "$1" diff --git a/net-mgmt/py-pypowerwall/pkg-plist b/net-mgmt/py-pypowerwall/pkg-plist new file mode 100644 index 000000000000..09ed5bef4d53 --- /dev/null +++ b/net-mgmt/py-pypowerwall/pkg-plist @@ -0,0 +1,13 @@ +%%DATADIR%%/HELP.md +%%DATADIR%%/README.md +@comment %%DATADIR%%/localhost.pem +@mode 555 +%%DATADIR%%/server.py +@mode +%%DATADIR%%/transform.py +%%DATADIR%%/web/black.js +%%DATADIR%%/web/clear.js +%%DATADIR%%/web/dakboard.js +%%DATADIR%%/web/example.html +%%DATADIR%%/web/grafana.js +%%DATADIR%%/web/white.js