void-packages/srcpkgs/upower/template
2019-01-17 20:40:56 +01:00

54 lines
1.6 KiB
Bash

# Template file for 'upower'
pkgname=upower
version=0.99.9
revision=1
_distver="${version//./_}"
wrksrc="upower-UPOWER_${_distver}"
build_style=gnu-configure
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"
makedepends="libusb-devel libgudev-devel dbus-glib-devel libimobiledevice-devel polkit-devel"
checkdepends="python3-dbus"
short_desc="Abstraction for enumerating power devices"
maintainer="Juan RP <xtraeme@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=388b273c59cad7d612dfe249c93f1e9c16532d6409f7fdc384bfa362e0dc5f0f
provides="upower0-${version}_${revision}"
replaces="upower0>=0"
# Package build options
build_options="gir"
# Disable gir for cross builds.
if [ -z "$CROSS_BUILD" ]; then
build_options_default="gir"
fi
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"
}
}