diff mbox series

[meta-oe,PATCHv2,3/3] flatpak: add recipe

Message ID 20221223031104.13517-3-f_l_k@t-online.de
State Under Review
Headers show
Series [meta-oe,PATCHv2,1/3] xdg-desktop-portal-gnome: add recipe | expand

Commit Message

Markus Volk Dec. 23, 2022, 3:11 a.m. UTC
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 .../0001-flatpak-pc-add-pc_sysrootdir.patch   | 26 ++++++++
 .../flatpak/flatpak_1.15.1.bb                 | 64 +++++++++++++++++++
 2 files changed, 90 insertions(+)
 create mode 100644 meta-oe/recipes-extended/flatpak/flatpak/0001-flatpak-pc-add-pc_sysrootdir.patch
 create mode 100644 meta-oe/recipes-extended/flatpak/flatpak_1.15.1.bb
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/flatpak/flatpak/0001-flatpak-pc-add-pc_sysrootdir.patch b/meta-oe/recipes-extended/flatpak/flatpak/0001-flatpak-pc-add-pc_sysrootdir.patch
new file mode 100644
index 000000000..99e9cd23b
--- /dev/null
+++ b/meta-oe/recipes-extended/flatpak/flatpak/0001-flatpak-pc-add-pc_sysrootdir.patch
@@ -0,0 +1,26 @@ 
+From 3a1ab02d821cd4b0af44c0dad87e290ebaabef83 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Wed, 14 Dec 2022 06:50:40 +0100
+Subject: [PATCH] flatpak.pc: add pc_sysrootdir
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4a0b865e..5f69b1d9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -509,7 +509,7 @@ pkgconfig_variables += 'exec_prefix=${prefix}'
+ pkgconfig_variables += 'datadir=' + ('${prefix}' / get_option('datadir'))
+ 
+ pkgconfig_variables += 'datarootdir=' + ('${prefix}' / get_option('datadir'))
+-pkgconfig_variables += 'interfaces_dir=${datadir}/dbus-1/interfaces/'
++pkgconfig_variables += 'interfaces_dir=${pc_sysrootdir}${datadir}/dbus-1/interfaces/'
+ pkgconfig_variables += 'httpbackend=' + get_option('http_backend')
+ 
+ pkgconfig.generate(
+-- 
+2.34.1
+
diff --git a/meta-oe/recipes-extended/flatpak/flatpak_1.15.1.bb b/meta-oe/recipes-extended/flatpak/flatpak_1.15.1.bb
new file mode 100644
index 000000000..a906e6761
--- /dev/null
+++ b/meta-oe/recipes-extended/flatpak/flatpak_1.15.1.bb
@@ -0,0 +1,64 @@ 
+DESCRIPTION = "Desktop containment framework."
+HOMEPAGE = "http://flatpak.org"
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = " \
+    gitsm://github.com/flatpak/flatpak;protocol=https;nobranch=1 \
+    file://0001-flatpak-pc-add-pc_sysrootdir.patch \
+"
+
+SRCREV = "47ea3934c0e055605b8dff93edad2136141e48ec"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig gettext systemd gobject-introspection python3native useradd mime features_check
+
+REQUIRED_DISTRO_FEATURES = "polkit"
+
+DEPENDS = " \
+    appstream \
+    bison-native \
+    curl \
+    dconf \
+    fuse3 \
+    gdk-pixbuf \
+    glib-2.0 \
+    gpgme \
+    json-glib \
+    libarchive \
+    libcap \
+    libxslt-native \
+    ostree \
+    polkit \
+    python3-pyparsing-native \
+    xmlto-native \
+"
+
+RDEPENDS:${PN} = " \
+    bubblewrap \
+    ca-certificates \
+    dconf \
+"
+
+GIR_MESON_OPTION = ""
+
+PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,xauth"
+PACKAGECONFIG[xauth] = "-Dxauth=enabled,-Dxauth=disabled,xauth"
+PACKAGECONFIG[seccomp] = "-Dseccomp=enabled,-Dseccomp=disabled,libseccomp"
+
+PACKAGECONFIG ?= " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xauth', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'security', 'seccomp', '', d)} \
+"
+
+FILES:${PN} += "${libdir} ${datadir}"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd"
+
+do_install:append() {
+    chmod 0700 ${D}/${datadir}/polkit-1/rules.d
+    chown polkitd ${D}/${datadir}/polkit-1/rules.d
+    chgrp root ${D}/${datadir}/polkit-1/rules.d
+}