blob: 2343cec71ad5b329810fa349ef3780c771fb3ad7 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager"
2LICENSE = "GPL-3.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
4
5DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
6
7inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache
8
9SRC_URI = " \
10 git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \
11 file://0001-Search-for-cython3.patch \
12 file://0002-fix-fail-to-enable-bluetooth.patch \
13 file://0001-meson-add-pythoninstalldir-option.patch \
14"
15S = "${WORKDIR}/git"
16SRCREV = "c85e7afb8d6547d4c35b7b639124de8e999c3650"
17
18EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}"
19
20SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service"
21SYSTEMD_AUTO_ENABLE:${PN} = "disable"
22
23RRECOMMENDS:${PN} += "adwaita-icon-theme"
24RDEPENDS:${PN} += " \
25 python3-core \
26 python3-dbus \
27 python3-pygobject \
28 python3-terminal \
29 python3-fcntl \
30 packagegroup-tools-bluetooth \
31"
32
33PACKAGECONFIG ??= " \
34 ${@bb.utils.filter('DISTRO_FEATURES', 'polkit pulseaudio ', d)} \
35 thunar \
36"
37PACKAGECONFIG[thunar] = "-Dthunar-sendto=true,-Dthunar-sendto=false"
38PACKAGECONFIG[pulseaudio] = "-Dpulseaudio=true,-Dpulseaudio=false"
39PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false"
40
41FILES:${PN} += " \
42 ${datadir} \
43 ${systemd_user_unitdir} \
44 ${PYTHON_SITEPACKAGES_DIR} \
45"
46
47# In code, path to python is a variable that is replaced with path to native version of it
48# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3.
49# Replace it with #!/usr/bin/env python3
50do_install:append() {
51 sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \
52 ${D}${prefix}/libexec/blueman-mechanism \
53 ${D}${bindir}/blueman-adapters \
54 ${D}${bindir}/blueman-applet \
55 ${D}${bindir}/blueman-manager \
56 ${D}${bindir}/blueman-sendto \
57 ${D}${bindir}/blueman-services \
58 ${D}${bindir}/blueman-tray
59}
60