Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PowerPanel for CyberPower UPS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
shurutov
n00b
n00b


Joined: 05 Jun 2009
Posts: 5
Location: Moscow

PostPosted: Thu Mar 31, 2016 7:07 am    Post subject: PowerPanel for CyberPower UPS Reply with quote

Hello guys!

I wrote the ebuild for PowerPanel software for CyberPower UPS.

powerpanel-1.3.2.ebuild:
Code:
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

ZIPPV=${PV//./}
DESCRIPTION="Software for CyberPower Systems UPS devices"
HOMEPAGE="https://www.cyberpowersystems.com/products/software/pppe-linux-software"
SRC_URI="x86? ( https://dl4jz3rbrsfum.cloudfront.net/software/${PN}-${ZIPPV}-i386.tar.gz )
      amd64? ( https://dl4jz3rbrsfum.cloudfront.net/software/${PN}-${ZIPPV}-x86_64.tar.gz )"

LICENSE="PowerPanel"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd"

DEPEND=""
RDEPEND="virtual/libusb:0"

src_install() {
   dosbin bin/pwrstat{,d}
   doman doc/pwrstat{,d}.8
   dodoc doc/{README,LICENSE,install-guide,user-manual,deploy-guide}

   insinto /etc
   doins conf/pwrstatd.conf

   exeinto /etc
   doexe script/{pwrstatd-{email,powerfail,lowbatt},shutdown,hibernate}.sh

   newinitd script/default_pwrstatd pwrstatd

   fowners root:root /usr/sbin/pwrstat{,d}
   fowners root:root /etc/{shutdown,hibernate,pwrstatd-{powerfail,lowbatt,email}}.sh
   fowners root:root /etc/init.d/pwrstatd
   fowners root:root /etc/pwrstatd.conf

   fperms 700 /usr/sbin/pwrstat{,d}
   fperms 700 /etc/{shutdown,hibernate,pwrstatd-{powerfail,lowbatt,email}}.sh
   fperms 700 /etc/init.d/pwrstatd
   fperms 700 /etc/pwrstatd.conf

   if use systemd; then
      dodir /usr/lib64/systemd/system/
      insinto /usr/lib64/systemd/system/
      doins ${FILESDIR}/powerpanel.service
   fi
}

pkg_postinst()
{
   if use systemd; then
      systemctl daemon-reload
   fi
}


files/powerpanel.service:
Code:
[Unit]
Description=PowerPanel Daemon for CyberPower Systems UPS devices
Documentation=man:pwrstatd(8)

[Service]
ExecStart=/usr/sbin/pwrstatd

[Install]
WantedBy=multi-user.target


Manifest:
Code:
AUX powerpanel.service 180 SHA256 6d20c80c913c87b73e69fd89d0fe4b1813efad5b9f9ba8dde2da96cde8180fbc SHA512 ad62a499b474e90e971cf6da37dd0da3f9f038297df6d2d7efdf18f9996ffa430ec18e4e9ca774f64aae8bd557aa476a5a2525b9a16bae8da843e79427fcffe8 WHIRLPOOL ddbeb0632af21d81c602eef97a6f85cae73846f080b158e6ca936827e403526831dc50ae9fcb21787166a17dad044a4f7404b3932be79d8137b10b229397ab33
DIST powerpanel-132-i386.tar.gz 106265 SHA256 a0931fe71b7def7b72a1a80b9fc9a6419032eb98f78ad9da2971c904f88dc8f3 SHA512 450e70aa1db084972e2bcce026747267731ef4af8d320b7fd75e33e6333a8407906d85c544eb5fad99cbac78eb4d9841219f26903f5a09f10349d214dd510e4b WHIRLPOOL 6100f7a20091c5d321f35da325fc8dbc20041bd6786297c831c859cb7d5f8cac92caaa9f0ad89360be0b1d5872a9e03f72ac5220e77e38ce7ba53c6d0cd26a2b
DIST powerpanel-132-x86_64.tar.gz 216542 SHA256 265099590e82303fa1082a84dda02488d41762ca5b94f2bb7fd395c9b4ac1c36 SHA512 8b9f91bc383f82951821d5f18eb6c8002b1f40a79c03e04763d4e8c38b3c83e59b4b4e6f74d0bb0a6b01bdef8fcc95e98c29404e2dd28f3565f634be2d1fccf2 WHIRLPOOL 21ee65d09eaf0b0941d31799053208cda2baf46eeaa7b41de2c2f5aec986649401a035b706c7eb02e5ef877a01a91eac66323a8b69d696abced9b7a1f090be2e
EBUILD powerpanel-1.3.2.ebuild 1464 SHA256 9b338611693276f8961e09ab1b77cc2559f252a94fb01d28feafadded2bed8c6 SHA512 c99314cdaa734a17187f2d07b16d08748546139652a21f53ec4cf23738bab8ef4241ef8db654faa922f0311efeefd5f7c4df7aaa2bde6f7bc57857ab5daa59c6 WHIRLPOOL 68eec04b57534fbbf145b4fda3b6e785e4937595d6416d29221643d3842afc769a380ff7992ab720da48ee52bd9c2f59f5cc655ab39f534c4991c60d0327a0cf


I hope someone come in handy.
Sorry for my English.
_________________
WBR, Shurutov Michail
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Tue Jun 14, 2016 1:46 am    Post subject: Reply with quote

Thank you. It works beautifully with systemd on my local overlay. :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum