blob: 627b499fe84f81c1308bc61561a331dfa5d5dfbd [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001DESCRIPTION = "gvfs is a userspace virtual filesystem"
2LICENSE = "LGPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
4
5inherit gnomebase gsettings bash-completion gettext upstream-version-is-even features_check useradd
6
7DEPENDS += "\
8 dbus \
9 glib-2.0 \
10 glib-2.0-native \
11 gsettings-desktop-schemas \
12 libgudev \
13 libsecret \
14 libxml2 \
15 shadow-native \
16"
17
18RDEPENDS:${PN} += "gsettings-desktop-schemas"
19
20SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
21
22SRC_URI[archive.sha256sum] = "cdbd4440f6d08792a6e7521244c17386e20bd537d375117099fc8fb68fe91741"
23
24ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
25
26EXTRA_OEMESON = " \
27 -Dbluray=false \
28"
29
30PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
31
32FILES:${PN} += " \
33 ${datadir}/glib-2.0 \
34 ${datadir}/GConf \
35 ${datadir}/dbus-1/services \
36 ${libdir}/gio/modules/*.so \
37 ${libdir}/tmpfiles.d \
38 ${systemd_user_unitdir} \
39"
40
41FILES:${PN}-dbg += "${libdir}/gio/modules/.debug/*"
42FILES:${PN}-dev += "${libdir}/gio/modules/*.la"
43
44FILES:gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
45FILES:gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
46FILES:gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
47
48RRECOMMENDS:gvfsd-ftp += "openssh-sftp openssh-ssh"
49
50PACKAGECONFIG ?= "libgphoto2 \
51 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
52 ${@bb.utils.contains('DISTRO_FEATURES','polkit','udisks2','',d)} \
53 ${@bb.utils.contains('DISTRO_FEATURES','polkit','admin','',d)} \
54 "
55
56PACKAGECONFIG[udisks2] = "-Dudisks2=true, -Dudisks2=false, udisks2, udisks2"
57PACKAGECONFIG[admin] = "-Dadmin=true, -Dadmin=false, libcap polkit"
58PACKAGECONFIG[afc] = "-Dafc=true, -Dafc=false, libimobiledevice libplist"
59PACKAGECONFIG[archive] = "-Darchive=true, -Darchive=false, libarchive"
60PACKAGECONFIG[dnssd] = "-Ddnssd=true, -Ddnssd=false, avahi"
61PACKAGECONFIG[gcr] = "-Dgcr=true, -Dgcr=false, gcr3, gnome-keyring"
62PACKAGECONFIG[gcrypt] = "-Dgcrypt=true, -Dgcrypt=false, libgcrypt"
63PACKAGECONFIG[goa] = "-Dgoa=true, -Dgoa=false, gnome-online-accounts"
64PACKAGECONFIG[google] = "-Dgoogle=true, -Dgoogle=false, libgdata"
65PACKAGECONFIG[http] = "-Dhttp=true, -Dhttp=false, libsoup-3.0"
66PACKAGECONFIG[libmtp] = "-Dmtp=true, -Dmtp=false, libmtp"
67PACKAGECONFIG[logind] = "-Dlogind=true, -Dlogind=false, systemd"
68PACKAGECONFIG[libgphoto2] = "-Dgphoto2=true, -Dgphoto2=false, libgphoto2"
69PACKAGECONFIG[nfs] = "-Dnfs=true, -Dnfs=false,libnfs"
70PACKAGECONFIG[samba] = "-Dsmb=true, -Dsmb=false, samba"
71PACKAGECONFIG[systemd] = "-Dsystemduserunitdir=${systemd_user_unitdir} -Dtmpfilesdir=${libdir}/tmpfiles.d, -Dsystemduserunitdir=no -Dtmpfilesdir=no, systemd"
72
73# needs meta-filesystems
74PACKAGECONFIG[fuse] = "-Dfuse=true, -Dfuse=false, fuse3"
75
76# libcdio-paranoia recipe doesn't exist yet
77PACKAGECONFIG[cdda] = "-Dcdda=true, -Dcdda=false, libcdio-paranoia"
78
79USERADD_PACKAGES = "${PN}"
80USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd"
81
82do_install:append() {
83 if ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'true', 'false', d)}; then
84 # Fix up permissions on polkit rules.d to work with rpm4 constraints
85 chmod 700 ${D}${datadir}/polkit-1/rules.d
86 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
87 fi
88
89 # After rebuilds (not from scracth) it can happen that the executables in
90 # libexec ar missing executable permission flag. Not sure but it came up
91 # during transition to meson. Looked into build files and logs but could
92 # not find suspicious
93 for exe in `find ${D}/${libexecdir}`; do
94 chmod +x $exe
95 done
96}