blob: c73716d74975667c1502755dcb6c25cc77e5c890 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001DESCRIPTION = "gvfs is a userspace virtual filesystem"
2LICENSE = "LGPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
4
5GNOMEBASEBUILDCLASS = "meson"
6inherit gnomebase gsettings bash-completion gettext upstream-version-is-even features_check useradd
7
8DEPENDS += "libsecret glib-2.0 glib-2.0-native libgudev shadow-native \
9 gsettings-desktop-schemas dbus"
10
11RDEPENDS:${PN} += "gsettings-desktop-schemas"
12
13SRC_URI = " \
14 https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive \
15 file://Remove-incorrect-i18n.merge_file-argument.patch \
16"
17
18SRC_URI[archive.sha256sum] = "b0d1dda4e475066207305b0776b0daefeae790f6c0107ffd2687994c8e71915a"
19
20# depends on gsettings-desktop-schemas->gcr->gtk+3-> x11
21REQUIRED_DISTRO_FEATURES = "x11"
22
23EXTRA_OEMESON = " \
24 -Dbluray=false \
25 -Dgoa=false \
26 -Dgoogle=false \
27 -Dnfs=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, gcr"
62PACKAGECONFIG[http] = "-Dhttp=true, -Dhttp=false, libsoup-2.4"
63PACKAGECONFIG[libmtp] = "-Dmtp=true, -Dmtp=false, libmtp"
64PACKAGECONFIG[logind] = "-Dlogind=true, -Dlogind=false, systemd"
65PACKAGECONFIG[libgphoto2] = "-Dgphoto2=true, -Dgphoto2=false, libgphoto2"
66PACKAGECONFIG[samba] = "-Dsmb=true, -Dsmb=false, samba"
67PACKAGECONFIG[systemd] = "-Dsystemduserunitdir=${systemd_user_unitdir} -Dtmpfilesdir=${libdir}/tmpfiles.d, -Dsystemduserunitdir=no -Dtmpfilesdir=no, systemd"
68
69# needs meta-filesystems
70PACKAGECONFIG[fuse] = "-Dfuse=true, -Dfuse=false, fuse3"
71
72# libcdio-paranoia recipe doesn't exist yet
73PACKAGECONFIG[cdda] = "-Dcdda=true, -Dcdda=false, libcdio-paranoia"
74
75USERADD_PACKAGES = "${PN}"
76USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
77
78do_install:append() {
79 if ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'true', 'false', d)}; then
80 # Fix up permissions on polkit rules.d to work with rpm4 constraints
81 chmod 700 ${D}/${datadir}/polkit-1/rules.d
82 chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
83 fi
84
85 # After rebuilds (not from scracth) it can happen that the executables in
86 # libexec ar missing executable permission flag. Not sure but it came up
87 # during transition to meson. Looked into build files and logs but could
88 # not find suspicious
89 for exe in `find ${D}/${libexecdir}`; do
90 chmod +x $exe
91 done
92}