The UPower package provides an interface for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus.
This package is known to build and work properly using an LFS 12.2 platform.
Download (HTTP): https://gitlab.freedesktop.org/upower/upower/-/archive/v1.90.4/upower-v1.90.4.tar.bz2
Download MD5 sum: 2399845217a9c6e4510f66033fcd7cf6
Download size: 140 KB
Estimated disk space required: 5.5 MB (add 2.6 MB for tests)
Estimated build time: less than 0.1 SBU (add 0.6 SBU for tests)
libgudev-238 and libusb-1.0.27
GLib-2.80.4 (with GObject Introspection)
GTK-Doc-1.34.0, libxslt-1.1.42, docbook-xsl-nons-1.79.2, PyGObject-3.48.2, dbusmock-0.32.1, umockdev-0.18.3 (for part of the test suite), and libimobiledevice
Install UPower by running the following commands:
mkdir build &&
cd    build &&
meson setup ..                   \
      --prefix=/usr              \
      --buildtype=release        \
      -D gtk-doc=false           \
      -D man=false               \
      -D systemdsystemunitdir=no \
      -D udevrulesdir=/usr/lib/udev/rules.d &&
ninja
        
          To test the results, issue: LC_ALL=C
          ninja test. The test suite should be run from a
          local GUI session started with dbus-launch. On 32-bit machines, one
          test will fail due to rounding errors: Tests.test_battery_energy_charge_mixed. On some
          systems, two tests relating to the headphone hotplug feature are
          known to fail. Those can be safely ignored since the functionality
          still works.
        
          Now, as the root user:
        
ninja install
          -D gtk-doc=false: Prevents
          building the documentation. Remove this if you have GTK-Doc installed and wish to build the
          documentation.
        
          -D man=false: Prevents
          building the manual pages. Remove this if you have libxslt-1.1.42 and
          docbook-xsl-nons-1.79.2 installed and
          wish to build the manual pages.
        
          -D systemdsystemunitdir=no:
          Removes the dependency on systemd.
        
          -D
          udevrulesdir=/usr/lib/udev/rules.d: Tells the build
          system where to install udev rules
          because the information is missing in /usr/lib/pkgconfig/libudev.pc