commit:     01dc1bfda9420ad08035887f194f0958d16a3fab
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun Apr 17 18:58:11 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 18:58:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=01dc1bfd

New Package: CyberPower PowerPanel UPS software

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 app-misc/powerpanel/Manifest                |  1 +
 app-misc/powerpanel/files/pwrstatd          | 10 ++++
 app-misc/powerpanel/metadata.xml            |  8 +++
 app-misc/powerpanel/powerpanel-1.4.1.ebuild | 82 ++++++++++++++++++++++++++
 licenses/PowerPanel                         | 89 +++++++++++++++++++++++++++++
 5 files changed, 190 insertions(+)

diff --git a/app-misc/powerpanel/Manifest b/app-misc/powerpanel/Manifest
new file mode 100644
index 000000000..055faeeca
--- /dev/null
+++ b/app-misc/powerpanel/Manifest
@@ -0,0 +1 @@
+DIST powerpanel-1.4.1.tar.gz 1819169 BLAKE2B 
da37c44e61ca118b06010e79b8f76ad910e39e1932fc5bae65152d31ddbfda7dcde879c16cc93c6a5e74b449c879172f703be43d8af7b58eb205cdcd748a4fd8
 SHA512 
75aabe9c8e13ab32195126c0c3e3b6135872ddca2d40e5b075d9492e4786902d74d03b5c8f0d8273cc1ada61536e1ba189ffa5b91678f135655b91c96ec2247c

diff --git a/app-misc/powerpanel/files/pwrstatd 
b/app-misc/powerpanel/files/pwrstatd
new file mode 100644
index 000000000..d57a17a3d
--- /dev/null
+++ b/app-misc/powerpanel/files/pwrstatd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="pwrstatd daemon"
+description=""
+command=/usr/sbin/pwrstatd
+command_args="${pwrstatd_args}"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"

diff --git a/app-misc/powerpanel/metadata.xml b/app-misc/powerpanel/metadata.xml
new file mode 100644
index 000000000..97ba7c28b
--- /dev/null
+++ b/app-misc/powerpanel/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>jul...@jroy.ca</email>
+               <name>Julien Roy</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/app-misc/powerpanel/powerpanel-1.4.1.ebuild 
b/app-misc/powerpanel/powerpanel-1.4.1.ebuild
new file mode 100644
index 000000000..ad88aa788
--- /dev/null
+++ b/app-misc/powerpanel/powerpanel-1.4.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# Credits to shurutov, inspired by 
https://forums.gentoo.org/viewtopic-t-1045122-view-previous.html
+
+EAPI=8
+
+DESCRIPTION="PowerPanel software for CyberPower UPS systems"
+HOMEPAGE="https://www.cyberpowersystems.com/";
+SRC_URI="x86? ( 
https://dl4jz3rbrsfum.cloudfront.net/software/PPL_32bit_v${PV}.tar.gz -> 
${P}.tar.gz )
+       amd64? ( 
https://dl4jz3rbrsfum.cloudfront.net/software/PPL_64bit_v${PV}.tar..gz -> 
${P}.tar.gz )"
+
+LICENSE="PowerPanel"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="systemd"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+       dev-libs/json-c
+       dev-libs/openssl
+       virtual/libusb"
+BDEPEND=""
+
+src_install() {
+       dosbin bin/pwrstat
+       dosbin bin/pwrstatd
+
+       doman doc/pwrstat.8
+       doman doc/pwrstatd.8
+
+       dodoc doc/README
+       dodoc doc/LICENSE
+       dodoc doc/user-manual
+       dodoc doc/install-guide
+       dodoc doc/deploy-guide
+
+       insinto /etc
+       doins conf/pwrstatd.conf
+
+       exeinto /etc
+       doexe script/pwrstatd-powerfail.sh
+       doexe script/pwrstatd-lowbatt.sh
+       doexe script/pwrstatd-email.sh
+       doexe script/shutdown.sh
+       doexe script/hibernate.sh
+
+       newlib.so lib/libpaho-mqtt3cs.so.1.3.1 libpaho-mqtt3cs.so.1
+
+       if use systemd; then
+               insinto /usr/lib/systemd/system/
+               doins script/pwrstatd.service
+               newinitd script/default_pwrstatd pwrstatd
+       else
+               newinitd ${FILESDIR}/pwrstatd pwrstatd
+       fi
+
+       fowners root:root /usr/sbin/pwrstat
+       fowners root:root /usr/sbin/pwrstatd
+       fowners root:root /etc/pwrstatd-powerfail.sh
+       fowners root:root /etc/pwrstatd-lowbatt.sh
+       fowners root:root /etc/pwrstatd-email.sh
+       fowners root:root /etc/shutdown.sh
+       fowners root:root /etc/hibernate.sh
+       fowners root:root /etc/init.d/pwrstatd
+       fowners root:root /etc/pwrstatd.conf
+
+       fperms 700 /usr/sbin/pwrstat
+       fperms 700 /usr/sbin/pwrstatd
+       fperms 755 /etc/pwrstatd-powerfail.sh
+       fperms 755 /etc/pwrstatd-lowbatt.sh
+       fperms 755 /etc/pwrstatd-email.sh
+       fperms 755 /etc/shutdown.sh
+       fperms 755 /etc/hibernate.sh
+       fperms 755 /etc/init.d/pwrstatd
+       fperms 755 /etc/pwrstatd.conf
+}
+
+pkg_postinst() {
+       if use systemd; then
+               systemctl daemon-reload
+       fi
+}

diff --git a/licenses/PowerPanel b/licenses/PowerPanel
new file mode 100644
index 000000000..57c22285f
--- /dev/null
+++ b/licenses/PowerPanel
@@ -0,0 +1,89 @@
+
+Software License Agreement
+
+
+Please read the terms and conditions of this license agreement (the "License" 
+before installing the computer software (the "PowerPanel")
+
+By installing and using the PowerPanel you accept and agree to the terms of 
this
+License. This License constitutes the entire agreement concerning the 
PowerPanel 
+between you and Cyber Power Systems, Inc. ("CyberPower") and it supersedes any 
+prior proposal or representation. 
+If you do not agree with these terms and conditions, promptly un-install the 
+PowerPanel.
+
+The term "PowerPanel" includes, and these terms and conditions also apply to, 
+any updates, modifications and upgrades to the PowerPanel that you may receive 
+from time to time. 
+
+1. License Grant 
+
+This License permits you to use the PowerPanel solely for your use per the 
+purchased products which the PowerPanel is accompanied by of CyberPower.
+
+You agree that you will not sub-license, assign, transfer, distribute, pledge, 
+lease, rent or share your rights under this License except with prior written 
+permission from CyberPower. 
+
+You agree that you will not modify, adapt or translate, disassemble, decompile,
+reverse engineer or otherwise attempt to discover the source code of the 
+PowerPanel. 
+
+2. CyberPower's Rights 
+
+You acknowledge and agree that the PowerPanel is proprietary products of 
+CyberPower under international copyright law and disclosed to you by 
CyberPower 
+in confidence. 
+
+You shall take all reasonable steps to safeguard the PowerPanel. 
+CyberPower owns and retains all copyright- , trademark-, trade secret- and 
other 
+proprietary rights in and to the Licensed Products. 
+
+This License conveys only a non-exclusive and limited right of use to you, 
+revocable in accordance with the terms and conditions of this License. 
+
+3. Limitation of Liability
+
+YOU AGREE THAT ALL INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
+KIND, EITHER EXPRESS OR IMPLIED. THERE ARE NO WARRANTIES OF ANY KIND, AND THERE
+ARE NO WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR PARTICULAR PURPOSE. 
+IN ADDITION, CYBERPOWER MAKES NO WARRANTIES OR REPRESENTATIONS CONCERNING 
+INTELLECTUAL PROPERTY, AND CYBERPOWER PROVIDES NO INDEMINIFICATIONS IN THIS 
+REGARD.
+
+In no event shall CyberPower be liable for any damages to you or any other 
+party whether arising out of contract or from tort including loss of data, 
+profits or business, or other special, incidental, exemplary or consequential
+damages, even if CyberPower has been advised of the possibility of such loss 
+or damages. CyberPower's cumulative liability shall not exceed the amount paid 
+by you for the purchased product of CyberPower which the PowerPanel is 
+accompanied by within ONE YEAR, if any, for use of the PowerPanel. 
+
+This section shall survive termination of this License. 
+
+4. Disclaimers 
+
+CYBERPOWER DISCLAIMS ANY AND ALL OTHER WARRANTIES, EXPRESSED OR IMPLIED, 
+INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR
+PURPOSE. 
+
+CyberPower does not warrant that the PowerPanel, its use, operation or your 
+ability to use the PowerPanel will be uninterrupted or error-free or that all 
+software errors will be corrected, including any defect or problems caused by 
+any defect in any hardware or software used in combination with the PowerPanel,
+or use of the PowerPanel in execution environments. 
+
+CyberPower does not warrant that the PowerPanel or service will meet your 
+equirements or that the operation of the PowerPanel will be uninterrupted or
+error free. 
+
+5. Termination 
+
+This agreement is in effect until terminated. 
+The agreement may be terminated by CyberPower without any reason from time to
+time.
+The agreement also terminates if you fail to comply with any terms and
+conditions of this agreement. In such an event, you agree to destroy and erase
+all copies of the PowerPanel, and CyberPower will be entitled to all remedies 
+in accordance with applicable law. 
+

Reply via email to