From nobody Tue Jul 05 15:39:53 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 51D3E1D08F20; Tue, 5 Jul 2022 15:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lcn161BTnz4X6b; Tue, 5 Jul 2022 15:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657035594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDbrJ/nPFkQSf+OjsRH8bbIDZPM6DEt4J4OmKL13iXQ=; b=XxgWUWlCrXFxSNWeXZ3GfQqifdXyMlaf0DoHdJSRF5fczZWAx9r/BXCNG+7eSNm031bnE3 jjr/UAHqYqnaa1/e1+CbH7yhjp4OLtYWIBp/lOCGAB/h9KYZ452kYsIrwPciI/zkRVGqVX 7b2QQwb/E+hc1/Vn3fDZFvaYJfGqviJDYKW2y8UikIEG9ZrtGyJogsB/rsmT4XAMf8dQq4 4cmYSIoccuoofF0V/TThT+Px3NDqYgpEkkKOH4mckiKFrCu1qYy11i4iYx6bpRqFNZrttp klifZVf2wUuvxXYLLOW5iz8xOxJbtrwXviix+7y0BdTPxj2K/CxPnY9VDVvWUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 053D83A9; Tue, 5 Jul 2022 15:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 265FdrAG011050; Tue, 5 Jul 2022 15:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 265FdrBq011049; Tue, 5 Jul 2022 15:39:53 GMT (envelope-from git) Date: Tue, 5 Jul 2022 15:39:53 GMT Message-Id: <202207051539.265FdrBq011049@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ryan Steinmetz Subject: git: fa3dcc3ff7db - main - net-mgmt/py-pypowerwall: Update to 0.5.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa3dcc3ff7dbb27c3bd0821ff38c19daacc0d213 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657035594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDbrJ/nPFkQSf+OjsRH8bbIDZPM6DEt4J4OmKL13iXQ=; b=CTq9OAs8M7QwYjnXKCNhEYpxBxq91xttiWaF3yR39MzMc4II5omVkDqpDJUNUS7K0Qpgf3 01XNVusMWYk8lB0DwcNBKillcmB6Wb21y3ZKxY+iIxB2WvRe/U/rkPzUn3aVTV/eWt+VGz Cpovi5TPQ3Y5sNePz56LkcyHxPZMfgQfn5uYMzS+fI+ydUZRqO7qJIAGX0jAbdl5FxSvG4 LkqAkPgH5BNvwZvt8teZ/rVFxbhDDu+/uqnOTGPyKyUUY09OIIcM9SHqC+JxLb8vXvmXR7 184qFE4lEK02P6nFrxHNet22xgV4aAxevp/J17to8mm+0wnGPn1MlV9baWKCAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657035594; a=rsa-sha256; cv=none; b=J5rKmhrTpkmXSty3CV1qDhx/tH3EddPquDmiGDegaGZKL3/UxywwPlvX5sGaBhxbFFkEXO i2Jd+ptsGFuIz69QQN046uxBWhZ4WvDSS0xqSvuWaVVaayTmC3y+NDp8vrMGwbb7DNEd8y 1sqewfZec9pO3nNa3y3HE9TMTW5hrgcumF30+rsWfYDrQ1kvCr/XxToEx2OF20xG/Y0xWa nR0qmlHn6T3Jh7CFX1Upk8qh74jFAd8kg4il/3/XWwF2lDizgefXNYicZBb9rOgR83OB9W 7i8nQ/Ip4aqLNA8megPmA6G4MUPNnJlJNHG7y5DZq2gN/RyoSwxRnEsKh6/QIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zi: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa3dcc3ff7dbb27c3bd0821ff38c19daacc0d213 commit fa3dcc3ff7dbb27c3bd0821ff38c19daacc0d213 Author: Ryan Steinmetz AuthorDate: 2022-07-05 15:38:58 +0000 Commit: Ryan Steinmetz 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 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 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