NAME="upower"
DESC="Interface for enumerating power devices, listening to device events and querying history and statistics"
VERSION="1.90.2"
FILES=("https://gitlab.freedesktop.org/upower/upower/-/archive/v$VERSION/upower-v$VERSION.tar.bz2")
HASHES=("bfd6e3275e61d7e097b53eb2b216fffa")
DEPENDS=("libgudev" "libusb" "gobject-introspection")

PACKAGE() {
  tar xf $NAME-v$VERSION.tar.bz2
  cd $NAME-v$VERSION

  sed '/parse_version/d' -i src/linux/integration-test.py
  mkdir build
  cd    build 

  meson setup ..          \
      --prefix=/usr       \
      --buildtype=release \
      -Dgtk-doc=false     \
      -Dman=false 
  ninja && DESTDIR="$ROOTDIR" ninja install

  cd ../.. && rm -r $NAME-v$VERSION
}
