summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Henson2018-03-16 17:36:23 -0600
committerJeff Henson2018-03-16 17:36:23 -0600
commit71f1fd0293f44f56ba7b45668d5d70d682b68b22 (patch)
tree173a3cc85afc147848c910ecf60d20ce509f1737
parentbb0f7a0086a5f7c1b999cbec95ceb697f0a2d3e2 (diff)
downloadaur-71f1fd0293f44f56ba7b45668d5d70d682b68b22.tar.gz
Clean up PKGBUILD
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD82
3 files changed, 47 insertions, 45 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 396b2f8c847..8c372ad1b6f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = powerpanel
pkgdesc = CyberPower UPS daemon
pkgver = 1.3.2
- pkgrel = 5
- url = http://www.cyberpowersystems.com
+ pkgrel = 5
+ url = https://www.cyberpowersystems.com
arch = x86_64
arch = i686
license = custom:CyberPower
@@ -11,6 +11,10 @@ pkgbase = powerpanel
backup = etc/powerpanel/pwrstatd-lowbatt.sh
backup = etc/powerpanel/pwrstatd-email.sh
backup = etc/pwrstatd.conf
+ source = pwrstatd.service
+ source = https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-132-x86_64.tar.gz
+ sha256sums = 2bcf5ba2c5d8c9ab886b6a5aba06f0da1630fabb440621860b2da221fcf9eb34
+ sha256sums = 265099590e82303fa1082a84dda02488d41762ca5b94f2bb7fd395c9b4ac1c36
pkgname = powerpanel
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..a304e8b9dfd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+powerpanel-*.tar.gz
+*.pkg.tar*
diff --git a/PKGBUILD b/PKGBUILD
index af7d463957e..3fdae1c4e42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,72 +2,68 @@
# Contributor: Kyle Keen <keenerd [at] gmail.com>, das-ich <das-ich [at] yandex.ru>
pkgname=powerpanel
pkgver=1.3.2
-pkgverdl=132 # new URL doesn't include the decimal
+_pkgverdl=132
pkgrel=5
pkgdesc="CyberPower UPS daemon"
arch=("x86_64" "i686")
-url="http://www.cyberpowersystems.com"
+url="https://www.cyberpowersystems.com"
license=("custom:CyberPower")
depends=('libusb')
backup=(etc/powerpanel/pwrstatd-{powerfail,lowbatt,email}.sh
- etc/pwrstatd.conf)
+ etc/pwrstatd.conf)
+
+source=('pwrstatd.service')
+sha256sums=('2bcf5ba2c5d8c9ab886b6a5aba06f0da1630fabb440621860b2da221fcf9eb34')
if [[ $CARCH = 'x86_64' ]]; then
- source=(https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-$pkgverdl-x86_64.tar.gz pwrstatd.service)
- sha256sums=('265099590e82303fa1082a84dda02488d41762ca5b94f2bb7fd395c9b4ac1c36'
- '2bcf5ba2c5d8c9ab886b6a5aba06f0da1630fabb440621860b2da221fcf9eb34')
+ source+=("https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-$_pkgverdl-x86_64.tar.gz")
+ sha256sums+=('265099590e82303fa1082a84dda02488d41762ca5b94f2bb7fd395c9b4ac1c36')
fi
if [[ $CARCH = 'i686' ]]; then
- source=( https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-$pkgverdl-i386.tar.gzpwrstatd.service)
- sha256sums=('a0931fe71b7def7b72a1a80b9fc9a6419032eb98f78ad9da2971c904f88dc8f3'
- '2bcf5ba2c5d8c9ab886b6a5aba06f0da1630fabb440621860b2da221fcf9eb34')
-
+ source+=("https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-$_pkgverdl-i386.tar.gz")
+ sha256sums+=('a0931fe71b7def7b72a1a80b9fc9a6419032eb98f78ad9da2971c904f88dc8f3')
fi
package() {
- cd ${srcdir}/$pkgname-$pkgver
-#
-# copy files
-#
-
-# PowerPanel for Linux client program
-install -Dm755 bin/pwrstat ${pkgdir}/usr/bin/pwrstat
+ cd "${srcdir}/$pkgname-$pkgver"
-# PowerPanel for Linux daemon program
-install -Dm755 bin/pwrstatd ${pkgdir}/usr/bin/pwrstatd
+ # PowerPanel for Linux client program
+ install -Dm755 bin/pwrstat "${pkgdir}/usr/bin/pwrstat"
-# PowerPanel for Linux daemon configuration
-install -Dm600 conf/pwrstatd.conf ${pkgdir}/etc/pwrstatd.conf
-sed -e 's#/etc#/etc/powerpanel#' -i ${pkgdir}/etc/pwrstatd.conf
+ # PowerPanel for Linux daemon program
+ install -Dm755 bin/pwrstatd "${pkgdir}/usr/bin/pwrstatd"
-# Script command for event of power failure
-install -Dm755 script/pwrstatd-powerfail.sh ${pkgdir}/etc/powerpanel/pwrstatd-powerfail.sh
-sed -e 's#/etc#/etc/powerpanel#' -i ${pkgdir}/etc/powerpanel/pwrstatd-powerfail.sh
+ # PowerPanel for Linux daemon configuration
+ install -Dm600 conf/pwrstatd.conf "${pkgdir}/etc/pwrstatd.conf"
+ sed -e 's#/etc#/etc/powerpanel#' -i "${pkgdir}/etc/pwrstatd.conf"
-# Script command for event of battery low
-install -Dm755 script/pwrstatd-lowbatt.sh ${pkgdir}/etc/powerpanel/pwrstatd-lowbatt.sh
-sed -e 's#/etc#/etc/powerpanel#' -i ${pkgdir}/etc/powerpanel/pwrstatd-lowbatt.sh
+ # Script command for event of power failure
+ install -Dm755 script/pwrstatd-powerfail.sh "${pkgdir}/etc/powerpanel/pwrstatd-powerfail.sh"
+ sed -e 's#/etc#/etc/powerpanel#' -i "${pkgdir}/etc/powerpanel/pwrstatd-powerfail.sh"
-# Script command for e-mail notification
-install -Dm755 script/pwrstatd-email.sh ${pkgdir}/etc/powerpanel/pwrstatd-email.sh
+ # Script command for event of battery low
+ install -Dm755 script/pwrstatd-lowbatt.sh "${pkgdir}/etc/powerpanel/pwrstatd-lowbatt.sh"
+ sed -e 's#/etc#/etc/powerpanel#' -i "${pkgdir}/etc/powerpanel/pwrstatd-lowbatt.sh"
-# Systemd unit
-install -Dm644 ../pwrstatd.service ${pkgdir}/usr/lib/systemd/system/pwrstatd.service
+ # Script command for e-mail notification
+ install -Dm755 script/pwrstatd-email.sh "${pkgdir}/etc/powerpanel/pwrstatd-email.sh"
-# PowerPanel for Linux client man-page
-install -Dm644 doc/pwrstat.8 ${pkgdir}/usr/share/man/man8/pwrstat.8
+ # Systemd unit
+ install -Dm644 "${srcdir}/pwrstatd.service" "${pkgdir}/usr/lib/systemd/system/pwrstatd.service"
-# PowerPanel for Linux daemon man-page
-install -Dm644 doc/pwrstatd.8 ${pkgdir}/usr/share/man/man8/pwrstatd.8
+ # PowerPanel for Linux client man-page
+ install -Dm644 doc/pwrstat.8 "${pkgdir}/usr/share/man/man8/pwrstat.8"
-#
-# compress the man page file
-#
-gzip -9 ${pkgdir}/usr/share/man/man8/pwrstat.8
-gzip -9 ${pkgdir}/usr/share/man/man8/pwrstatd.8
+ # PowerPanel for Linux daemon man-page
+ install -Dm644 doc/pwrstatd.8 "${pkgdir}/usr/share/man/man8/pwrstatd.8"
-# Install License
-install -D -m644 doc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ #
+ # compress the man page file
+ #
+ gzip -9 "${pkgdir}/usr/share/man/man8/pwrstat.8"
+ gzip -9 "${pkgdir}/usr/share/man/man8/pwrstatd.8"
+ # Install License
+ install -D -m644 doc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}