#### Beyond Linux® From Scratch (systemd Edition) - Version 10.1

### Chapter 12. System Utilities

- Prev

  UnZip-6.0

- Next

  usbutils-013

- Up
- Home

# UPower-0.99.11

## Introduction to UPower

The UPower package provides an interface to 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-10.1 platform.

### Package Information

- Download (HTTP): https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz

- Download MD5 sum: abe6acb617f11f2e8dbd9846fcf86e24

- Download size: 424 KB

- Estimated disk space required: 11 MB (add 3MB for tssts)

- Estimated build time: 0.1 SBU (add 0.1 SBU for tests)

### UPower Dependencies

#### Required

libgudev-234, libusb-1.0.24, and Polkit-0.118

#### Optional (Required if building GNOME)

gobject-introspection-1.66.1

#### Optional

GTK-Doc-1.33.2, PyGObject-3.38.0, dbusmock-0.22.0, and umockdev-0.15.4 (for part of the test suite).

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/upower

## Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

    General Setup --->
        [*] Namespaces support --->     [CONFIG_NAMESPACES]
           [*] User namespace           [CONFIG_USER_NS]

## Installation of UPower

Install UPower by running the following commands:

    ./configure --prefix=/usr        \
                --sysconfdir=/etc    \
                --localstatedir=/var \
                --enable-deprecated  \
                --disable-static     &&
    make

To test the results, issue: make check. Some checks may not pass due to missing files. Test suite should be run from a local GUI session started with dbus-launch.

Now, as the `root` user:

    make install

## Command Explanations

`--enable-deprecated`: This switch enables deprecated functionality which is still needed by some applications.

`--disable-static`: This switch prevents installation of static versions of the libraries.

`--enable-gtk-doc`: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

## Configuring UPower

###

#### Systemd Unit

To start the UPower service at boot, enable the previously installed systemd unit by running the following command as the `root` user:

    systemctl enable upower

## Contents

Installed Program: upower
Installed Libraries: libupower-glib.so
Installed Directories: /etc/UPower, /usr/include/libupower-glib, and /var/lib/upower

### Short Descriptions

upower | is the UPower command line tool
`libupower-glib.so` | contains the UPower API functions

Last updated on 2021-02-22 21:05:47 -0800

- Prev

  UnZip-6.0

- Next

  usbutils-013

- Up
- Home