未验证 提交 fd77ea1e 编写于 作者: J João Moreno 提交者: GitHub

Merge pull request #70884 from Wimpressive-Snaps/snapcraft-update

Snapcraft update. Fixes #63194 Fixes #57019
#!/bin/sh #!/usr/bin/env bash
# Create $XDG_RUNTIME_DIR if it doesn't exist # On Fedora $SNAP is under /var and there is some magic to map it to /snap.
# We need to handle that case and reset $SNAP
SNAP=$(echo $SNAP | sed -e "s|/var/lib/snapd||g")
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
export XDG_CACHE_HOME=$SNAP_USER_COMMON/.cache
if [[ -d $SNAP_USER_DATA/.cache && ! -e $XDG_CACHE_HOME ]]; then
# the .cache directory used to be stored under $SNAP_USER_DATA, migrate it
mv $SNAP_USER_DATA/.cache $SNAP_USER_COMMON/
fi
mkdir -p $XDG_CACHE_HOME
# Gdk-pixbuf loaders
export GDK_PIXBUF_MODULE_FILE=$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache
export GDK_PIXBUF_MODULEDIR=$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders
if [ -f $SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders ]; then
$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > $GDK_PIXBUF_MODULE_FILE
fi
# Create $XDG_RUNTIME_DIR if not exists (to be removed when https://pad.lv/1656340 is fixed)
[ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700 [ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700
exec "$@" exec "$@"
...@@ -10,34 +10,54 @@ grade: stable ...@@ -10,34 +10,54 @@ grade: stable
confinement: classic confinement: classic
parts: parts:
gnome:
plugin: nil
build-packages:
- software-properties-common
override-pull: |
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
apt -y update
code: code:
after:
- gnome
plugin: dump plugin: dump
source: . source: .
stage-packages: stage-packages:
- fcitx-frontend-gtk3
- gvfs-libs
- libasound2 - libasound2
- libc++1 - libgconf-2-4
- libglib2.0-bin
- libgnome-keyring0
- libgtk-3-0
- libnotify4 - libnotify4
- libnspr4 - libnspr4
- libnss3 - libnss3
- libpcre3 - libpcre3
- libpulse0 - libpulse0
- libsecret-1-0
- libxss1 - libxss1
- libxtst6 - libxtst6
- libxkbcommon0 - zlib1g
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- unity-gtk2-module
- libappindicator1
- xdg-user-dirs
- libsecret-1-0
# TODO@joao @Tyriar check these deps
# - libatomic1
# - libgtk2.0-bin
prime: prime:
- -usr/share/dh-python - -usr/share/doc
- -usr/share/fonts
- -usr/share/icons
- -usr/share/lintian
- -usr/share/man
apps: apps:
@@NAME@@: @@NAME@@:
command: electron-launch ${SNAP}/usr/share/@@NAME@@/bin/@@NAME@@ command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@
desktop: usr/share/applications/@@NAME@@.desktop desktop: usr/share/applications/@@NAME@@.desktop
\ No newline at end of file environment:
DISABLE_WAYLAND: 1
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
url-handler:
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url
desktop: usr/share/applications/@@NAME@@-url-handler.desktop
environment:
DISABLE_WAYLAND: 1
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册