blob: ec0ac2b296684fda1f29895794dafc5938015ffe [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001DESCRIPTION = "gvfs is a userspace virtual filesystem"
2LICENSE = "LGPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
4
5GNOMEBASEBUILDCLASS = "meson"
Brad Bishope42b3e32020-01-15 22:08:42 -05006inherit gnomebase gsettings bash-completion gettext upstream-version-is-even features_check useradd
Brad Bishop19323692019-04-05 15:28:33 -04007
Brad Bishope42b3e32020-01-15 22:08:42 -05008DEPENDS += "libsecret glib-2.0 glib-2.0-native libgudev shadow-native \
9 gsettings-desktop-schemas dbus"
Brad Bishop19323692019-04-05 15:28:33 -040010
11SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
Andrew Geissler89770b02020-06-13 10:40:47 -050012SRC_URI[archive.md5sum] = "72383474f52d05c21ef2be96d0b91974"
13SRC_URI[archive.sha256sum] = "50ef3245d1b03666a40455109169a2a1bd51419fd2d51f9fa6cfd4f89f04fb46"
Brad Bishop19323692019-04-05 15:28:33 -040014
Brad Bishope42b3e32020-01-15 22:08:42 -050015# depends on gsettings-desktop-schemas->gcr->gtk+3-> x11
16REQUIRED_DISTRO_FEATURES = "x11"
Brad Bishop19323692019-04-05 15:28:33 -040017
18EXTRA_OEMESON = " \
19 -Dbluray=false \
Brad Bishop19323692019-04-05 15:28:33 -040020 -Dgoa=false \
21 -Dgoogle=false \
22 -Dnfs=false \
Brad Bishop19323692019-04-05 15:28:33 -040023"
24
25PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
26
27FILES_${PN} += " \
28 ${datadir}/glib-2.0 \
29 ${datadir}/GConf \
30 ${datadir}/dbus-1/services \
31 ${libdir}/gio/modules/*.so \
32 ${libdir}/tmpfiles.d \
33 ${systemd_user_unitdir} \
34"
Brad Bishop19323692019-04-05 15:28:33 -040035
36FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/*"
37FILES_${PN}-dev += "${libdir}/gio/modules/*.la"
38
39FILES_gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
40FILES_gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
41FILES_gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
42
43RRECOMMENDS_gvfsd-ftp += "openssh-sftp openssh-ssh"
44
Brad Bishop26bdd442019-08-16 17:08:17 -040045PACKAGECONFIG ?= "libgphoto2 \
46 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
47 ${@bb.utils.contains('DISTRO_FEATURES','polkit','udisks2','',d)} \
48 ${@bb.utils.contains('DISTRO_FEATURES','polkit','admin','',d)} \
49 "
Brad Bishop19323692019-04-05 15:28:33 -040050
Brad Bishop26bdd442019-08-16 17:08:17 -040051PACKAGECONFIG[udisks2] = "-Dudisks2=true, -Dudisks2=false, udisks2, udisks2"
52PACKAGECONFIG[admin] = "-Dadmin=true, -Dadmin=false, libcap polkit"
Brad Bishop19323692019-04-05 15:28:33 -040053PACKAGECONFIG[afc] = "-Dafc=true, -Dafc=false, libimobiledevice libplist"
54PACKAGECONFIG[archive] = "-Darchive=true, -Darchive=false, libarchive"
55PACKAGECONFIG[dnssd] = "-Ddnssd=true, -Ddnssd=false, avahi"
56PACKAGECONFIG[gcr] = "-Dgcr=true, -Dgcr=false, gcr"
57PACKAGECONFIG[http] = "-Dhttp=true, -Dhttp=false, libsoup-2.4"
58PACKAGECONFIG[libmtp] = "-Dmtp=true, -Dmtp=false, libmtp"
59PACKAGECONFIG[logind] = "-Dlogind=true, -Dlogind=false, systemd"
60PACKAGECONFIG[libgphoto2] = "-Dgphoto2=true, -Dgphoto2=false, libgphoto2"
61PACKAGECONFIG[samba] = "-Dsmb=true, -Dsmb=false, samba"
62PACKAGECONFIG[systemd] = "-Dsystemduserunitdir=${systemd_user_unitdir} -Dtmpfilesdir=${libdir}/tmpfiles.d, -Dsystemduserunitdir=no -Dtmpfilesdir=no, systemd"
63
64# needs meta-filesystems
65PACKAGECONFIG[fuse] = "-Dfuse=true, -Dfuse=false, fuse"
66
67# libcdio-paranoia recipe doesn't exist yet
68PACKAGECONFIG[cdda] = "-Dcdda=true, -Dcdda=false, libcdio-paranoia"
69
Brad Bishope42b3e32020-01-15 22:08:42 -050070USERADD_PACKAGES = "${PN}"
71USERADD_PARAM_${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
72
Brad Bishop19323692019-04-05 15:28:33 -040073do_install_append() {
Brad Bishop26bdd442019-08-16 17:08:17 -040074 if ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'true', 'false', d)}; then
75 # Fix up permissions on polkit rules.d to work with rpm4 constraints
76 chmod 700 ${D}/${datadir}/polkit-1/rules.d
77 chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
78 fi
Brad Bishop34ae6002019-04-08 15:21:03 -040079
80 # After rebuilds (not from scracth) it can happen that the executables in
81 # libexec ar missing executable permission flag. Not sure but it came up
82 # during transition to meson. Looked into build files and logs but could
83 # not find suspicious
Brad Bishopc342db32019-05-15 21:57:59 -040084 for exe in `find ${D}/${libexecdir}`; do
Brad Bishop34ae6002019-04-08 15:21:03 -040085 chmod +x $exe
86 done
Brad Bishop19323692019-04-05 15:28:33 -040087}