void-packages/srcpkgs/upower/template
2020-11-09 22:19:05 -05:00

57 lines
1.6 KiB
Bash

# Template file for 'upower'
pkgname=upower
version=0.99.11
revision=2
_distver="${version//./_}"
wrksrc="upower-UPOWER_${_distver}"
build_style=gnu-configure
build_helper="gir"
configure_args="--disable-static --with-backend=linux $(vopt_enable gir introspection)"
conf_files="/etc/UPower/UPower.conf"
hostmakedepends="automake gettext-devel glib-devel gobject-introspection gtk-doc
intltool libtool libxslt pkg-config which"
makedepends="libusb-devel libgudev-devel dbus-glib-devel
libimobiledevice-devel polkit-devel"
checkdepends="python3-dbus"
short_desc="Abstraction for enumerating power devices"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://upower.freedesktop.org"
distfiles="https://gitlab.freedesktop.org/upower/upower/-/archive/UPOWER_${_distver}/upower-UPOWER_${_distver}.tar.bz2"
checksum=d50961ff6d2c5bc5e9b8ef6611a12dc8933f722ebf7de245b97fbe72999ebd9b
provides="upower0-${version}_${revision}"
replaces="upower0>=0"
# Package build options
build_options="gir"
build_options_default="gir"
post_patch() {
vsed -i configure.ac -e '/PKG_CHECK_MODULES/s/libplist\b/libplist-2.0/'
}
pre_configure() {
NOCONFIGURE=1 ./autogen.sh
}
libupower-glib3_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove usr/lib/*.so.*
}
}
upower-devel_package() {
provides="upower0-devel-${version}_${revision}"
replaces="upower0-devel>=0"
depends="dbus-glib-devel libupower-glib3>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
vmove "usr/lib/*.so"
}
}