# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # The build function is executed in the source directory # This function is used to compile the source code build() { meson setup build --prefix=/usr \ -Dsystemduserunitdir=no \ -Dtmpfilesdir=no \ -Dman=true \ -Dbluray=false meson compile -C build } _pick() { local p="$1" f d; shift for f; do [ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; } d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}" mkdir -p "$(dirname "$d")" mv "$f" "$d" rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")" done } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package_gvfs() { meson install -C build --destdir="$BPM_OUTPUT" cd "$BPM_OUTPUT" # Move gvfs-afc files into split package _pick gvfs-afc \ usr/libexec/gvfs{-afc-volume-monitor,d-afc} \ usr/share/dbus-1/services/org.gtk.vfs.AfcVolumeMonitor.service \ usr/share/gvfs/mounts/afc.mount \ usr/share/gvfs/remote-volume-monitors/afc.monitor _pick gvfs-dnssd \ usr/libexec/gvfsd-{dav,dnssd} \ usr/share/GConf/gsettings/gvfs-dns-sd.convert \ usr/share/glib-2.0/schemas/org.gnome.system.dns_sd.gschema.xml \ usr/share/gvfs/mounts/{dav+sd,dav,dns-sd}.mount _pick gvfs-goa \ usr/libexec/gvfs-goa-volume-monitor \ usr/share/dbus-1/services/org.gtk.vfs.GoaVolumeMonitor.service \ usr/share/gvfs/remote-volume-monitors/goa.monitor _pick gvfs-google \ usr/libexec/gvfsd-google \ usr/share/gvfs/mounts/google.mount _pick gvfs-gphoto2 \ usr/libexec/gvfs{-gphoto2-volume-monitor,d-gphoto2} \ usr/share/dbus-1/services/org.gtk.vfs.GPhoto2VolumeMonitor.service \ usr/share/gvfs/mounts/gphoto2.mount \ usr/share/gvfs/remote-volume-monitors/gphoto2.monitor _pick gvfs-mtp \ usr/libexec/gvfs{-mtp-volume-monitor,d-mtp} \ usr/share/dbus-1/services/org.gtk.vfs.MTPVolumeMonitor.service \ usr/share/gvfs/mounts/mtp.mount \ usr/share/gvfs/remote-volume-monitors/mtp.monitor _pick gvfs-nfs \ usr/libexec/gvfsd-nfs \ usr/share/gvfs/mounts/nfs.mount _pick gvfs-onedrive \ usr/libexec/gvfsd-onedrive \ usr/share/gvfs/mounts/onedrive.mount _pick gvfs-smb \ usr/libexec/gvfsd-smb{,-browse} \ usr/share/GConf/gsettings/gvfs-smb.convert \ usr/share/glib-2.0/schemas/org.gnome.system.smb.gschema.xml \ usr/share/gvfs/mounts/smb{,-browse}.mount # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gvfs/COPYING } package_gvfs-afc() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-afc } package_gvfs-dnssd() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-dnssd } package_gvfs-goa() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-goa } package_gvfs-google() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-google } package_gvfs-gphoto2() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-gphoto2 } package_gvfs-mtp() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-mtp } package_gvfs-nfs() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-nfs } package_gvfs-onedrive() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-onedrive } package_gvfs-smb() { # Install package license install -d "$BPM_OUTPUT"/usr/share/licenses ln -s gvfs "$BPM_OUTPUT"/usr/share/licenses/gvfs-smb }