# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-battery-plugin
pkgver=1.1.6
pkgrel=0
pkgdesc="battery monitor plugin for the Xfce panel"
url="https://docs.xfce.org/panel-plugins/xfce4-battery-plugin/start"
arch="all"
license="GPL-2.0-or-later"
makedepends="xfce4-panel-dev libxfce4ui-dev perl-xml-parser intltool linux-headers"
subpackages="$pkgname-lang"
source="https://archive.xfce.org/src/panel-plugins/xfce4-battery-plugin/${pkgver%.*}/xfce4-battery-plugin-$pkgver.tar.bz2
	00-fix-percentage-detection.patch
	"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
809c0f24adf914501ae9431af43caa36f72594dc686451bdd27b895cca80a51e76120a1cf191944e4b8b004d18ecc890caca9faa725cee230516bb1d0ad57415  xfce4-battery-plugin-1.1.6.tar.bz2
d373c4ec7b0efbbf032bc553e04fa9b7784e3a41df83f285ca061696424f2c739a4b1a1a1c2f9f6a7b22ff8986ee4171eb009687297658ada027aa1c85536f6c  00-fix-percentage-detection.patch
"
