summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/upower/upower_1.90.6.bb
blob: d2f58d5b22889a5664a86b42dec04e69700494c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SUMMARY = "UPower is an abstraction for enumerating power devices"
DESCRIPTION = "UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics."
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=0de8fbf1d97a140d1d93b9f14dcfbf08"

DEPENDS = " \
    intltool-native \
    libusb1 \
    libgudev \
    glib-2.0 \
    dbus-glib \
"

SRC_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/archive/v${PV}/${BPN}-v${PV}.tar.bz2"
SRC_URI[sha256sum] = "aed4e42a21307512ad236ad58d7ee4e0196670c8524a168a0edccdc32964ea0c"
S = "${UNPACKDIR}/${BPN}-v${PV}"

UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/tags"
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)"

GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
GTKDOC_MESON_OPTION = "gtk-doc"

inherit meson pkgconfig gtk-doc gettext gobject-introspection systemd

PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)}"
PACKAGECONFIG[idevice] = "-Didevice=enabled,-Didevice=disabled,libimobiledevice libplist"
PACKAGECONFIG[systemd] = "-Dsystemdsystemunitdir=${systemd_system_unitdir},-Dsystemdsystemunitdir=no -Dudevrulesdir=${base_libdir}/udev/rules.d,systemd"
PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit"

EXTRA_OEMESON = " \
    -Dos_backend=linux \
    -Dman=false \
"

SYSTEMD_SERVICE:${PN} = "upower.service"
# don't start on boot by default - dbus does that on demand
SYSTEMD_AUTO_ENABLE = "disable"

RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_dbus}"
RRECOMMENDS:${PN} += "pm-utils"
FILES:${PN} += " \
    ${datadir}/dbus-1/ \
    ${datadir}/polkit-1/ \
    ${base_libdir}/udev/* \
"

do_install:append() {
    # remove integration tests scripts
    rm -rf ${D}${datadir}/installed-tests
    rm -rf ${D}${libexecdir}/upower
}