diff --git a/contrib/snap/fwupd-command b/contrib/snap/fwupd-command index 4957abbc3..ed6b74cd2 100755 --- a/contrib/snap/fwupd-command +++ b/contrib/snap/fwupd-command @@ -5,6 +5,17 @@ mkdir -p $XDG_CACHE_HOME export GIO_MODULE_DIR=$XDG_CACHE_HOME/gio-modules export XDG_DATA_DIRS="$SNAP/usr/share" +#determine architecture +if [ "$SNAP_ARCH" = "amd64" ]; then + ARCH="x86_64-linux-gnu" +elif [ "$SNAP_ARCH" = "armhf" ]; then + ARCH="arm-linux-gnueabihf" +elif [ "$SNAP_ARCH" = "arm64" ]; then + ARCH="aarch64-linux-gnu" +else + ARCH="$SNAP_ARCH-linux-gnu" +fi + # don't update between versions, we want to preserve previous data [ ! -d "$SNAP_USER_DATA/etc" ] && cp -R "$SNAP/etc" "$SNAP_USER_DATA" [ ! -d "$SNAP_USER_DATA/var" ] && cp -R "$SNAP/var" "$SNAP_USER_DATA" diff --git a/contrib/snap/snapcraft-master.yaml b/contrib/snap/snapcraft-master.yaml index 627536a39..e4e501f3d 100644 --- a/contrib/snap/snapcraft-master.yaml +++ b/contrib/snap/snapcraft-master.yaml @@ -264,7 +264,8 @@ parts: - libgpgme11 - libjson-glib-1.0-0 - libpolkit-gobject-1-0 - - gnupg + - glib-networking + - libglib2.0-bin prime: # we explicitly don't want /usr/bin/gpgconf # this will cause gpgme to error finding it @@ -300,7 +301,6 @@ parts: - -usr/share/info - -usr/share/gir-1.0 - -usr/share/upstart - - -usr/lib/*/glib-2.0 - -usr/lib/*/pkgconfig after: [appstream-glib-dev, gudev, gusb, gnu-efi, libefivar-fixpkgconfig, libsmbios, build-introspection, gettext] fix-bash-completion: diff --git a/contrib/snap/snapcraft-stable.yaml b/contrib/snap/snapcraft-stable.yaml index a84771637..c6a136685 100644 --- a/contrib/snap/snapcraft-stable.yaml +++ b/contrib/snap/snapcraft-stable.yaml @@ -259,6 +259,8 @@ parts: - libgpgme11 - libjson-glib-1.0-0 - libpolkit-gobject-1-0 + - glib-networking + - libglib2.0-bin prime: # we explicitly don't want /usr/bin/gpgconf # this will cause gpgme to error finding it @@ -294,7 +296,6 @@ parts: - -usr/share/info - -usr/share/gir-1.0 - -usr/share/upstart - - -usr/lib/*/glib-2.0 - -usr/lib/*/pkgconfig after: [appstream-glib-dev, gudev, gusb, gnu-efi, libefivar-fixpkgconfig, libsmbios, build-introspection, gettext] fix-bash-completion: