name: mailspring license: GPL-3.0 adopt-info: mailspring confinement: strict base: core22 compression: lzo architectures: - build-on: amd64 parts: mailspring: plugin: nil override-pull: | deb="$(ls $CRAFT_PROJECT_DIR/app/dist/mailspring-*.deb)" craftctl set version="$(basename "$deb" | grep -Eo "[0-9]+.[0-9]+.[0-9]+")" dpkg -x "$deb" "$CRAFT_PART_SRC" override-build: | cp -a "$CRAFT_PART_SRC"/* "$CRAFT_PART_INSTALL" craftctl default sed -i 's|Icon=mailspring|Icon=/usr/share/pixmaps/mailspring\.png|' \ $CRAFT_PART_INSTALL/usr/share/applications/Mailspring.desktop prime: - -usr/share/mailspring/chrome-sandbox parse-info: [usr/share/appdata/mailspring.appdata.xml] stage-packages: - libxkbfile1 cleanup: after: [mailspring] plugin: nil build-snaps: [core22, gnome-42-2204] override-prime: | set -eux build_snaps="core22 gnome-42-2204" for snap in $build_snaps; do cd "/snap/$snap/current" && \ find . -type f,l -exec rm -fv "$CRAFT_PRIME/{}" "$CRAFT_PRIME/usr/{}" \; done for CRUFT in bug lintian man; do rm -rf $CRAFT_PRIME/usr/share/$CRUFT done find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete -print find $CRAFT_PRIME/usr/share -type d -empty -delete -print apps: mailspring: command: usr/bin/mailspring --no-sandbox common-id: mailspring desktop: usr/share/applications/Mailspring.desktop extensions: [gnome] environment: HOME: $SNAP_USER_COMMON # Correct the TMPDIR path for Chromium Framework/Electron to # ensure libappindicator has readable resources. TMPDIR: $XDG_RUNTIME_DIR # Fallback to XWayland if running in a Wayland session. DISABLE_WAYLAND: 1 plugs: - avahi-observe - browser-support - cups-control - gsettings - opengl - home - desktop - desktop-legacy - mount-observe - network - network-bind - network-observe - password-manager-service - pulseaudio - removable-media - screen-inhibit-control - unity7 - x11