From 1b2d704b213ee547a16d8a7261929e658d88a3ce Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Tue, 15 Sep 2020 19:41:20 -0500 Subject: [PATCH] Cleaned up snap and changed confinement settings --- data/snap/snapcraft.yaml | 112 ++++++++++++--------------------------- 1 file changed, 35 insertions(+), 77 deletions(-) diff --git a/data/snap/snapcraft.yaml b/data/snap/snapcraft.yaml index d4ff2b66..d6583893 100644 --- a/data/snap/snapcraft.yaml +++ b/data/snap/snapcraft.yaml @@ -2,7 +2,7 @@ name: flameshot adopt-info: flameshot -base: core20 +base: core18 summary: Powerful yet simple to use screenshot software description: | A powerful open source screenshot and annotation tool for Linux, Flameshot @@ -12,6 +12,7 @@ description: | tools. grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict # use 'strict' once you have the right plugs and slots +#confinement: devmode # use 'strict' once you have the right plugs and slots architectures: - build-on: amd64 - build-on: i386 @@ -22,93 +23,31 @@ apps: adapter: full command: usr/bin/flameshot desktop: usr/share/applications/flameshot.desktop + extensions: + - kde-neon environment: DISABLE_WAYLAND: 1 XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS slots: [dbus-flameshot] plugs: - - desktop - - desktop-legacy - - gsettings + - kde-frameworks-5-plug - home + - removable-media - network - network-bind - opengl - pulseaudio - - unity7 - wayland - x11 - -plugs: - # Gtk Common Themes support - # https://forum.snapcraft.io/t/how-to-use-the-system-gtk-theme-via-the-gtk-common-themes-snap/6235 - gsettings: - gtk-3-themes: - interface: content - target: $SNAP/data-dir/themes - default-provider: gtk-common-themes - icon-themes: - interface: content - target: $SNAP/data-dir/icons - default-provider: gtk-common-themes - sound-themes: - interface: content - target: $SNAP/data-dir/sounds - default-provider: gtk-common-themes - - parts: - desktop-qt5: - source: https://github.com/ubuntu/snapcraft-desktop-helpers.git - source-subdir: qt - plugin: make - make-parameters: ["FLAVOR=qt5"] - build-packages: - - qtbase5-dev - - dpkg-dev - stage-packages: - - libxkbcommon0 - - ttf-ubuntu-font-family - - dmz-cursor-theme - - light-themes - - adwaita-icon-theme - - gnome-themes-standard - - shared-mime-info - - libqt5gui5 - - libgdk-pixbuf2.0-0 - - libgtk2.0-0 - - libqt5svg5 - - try: - - appmenu-qt5 - - locales-all - - xdg-user-dirs - - fcitx-frontend-qt5 - - libappindicator: - plugin: nil - stage-packages: - - libappindicator3-1 - after: [desktop-qt5] - prime: - - usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libdbusmenu*.so* - - usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libappindicator*.so* - - usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libindicator*.so* - - launchers: # custom launcher to set QT_QPA_PLATFORMTHEME=gtk3 correctly - source: . - source-subdir: snap/local/launchers - plugin: dump - organize: - '*': bin/ - stage: - - -bin/README.* - flameshot: - after: - - desktop-qt5 + build-snaps: + - kde-frameworks-5-core18-sdk + - kde-frameworks-5-core18 + - cmake #core18 does not have new enough cmake so install from snap plugin: cmake - cmake-parameters: + configflags: - '-DCMAKE_BUILD_TYPE=RelWithDebInfo' - '-DCMAKE_INSTALL_PREFIX=/usr' source: https://github.com/flameshot-org/flameshot.git @@ -126,9 +65,10 @@ parts: sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop build-packages: - - qt5-default - - qttools5-dev-tools - - qttools5-dev + - g++ + - make + - qt5-default + - qttools5-dev-tools - libqt5svg5-dev stage-packages: - dbus-x11 @@ -136,8 +76,26 @@ parts: - openssl - ca-certificates - qtwayland5 - - qt5-gtk-platformtheme # for theming, font settings, cursor and to use gtk3 file chooser - + - libqt5dbus5 + - libqt5network5 + - libqt5core5a + - libqt5widgets5 + - libqt5gui5 + - libqt5svg5 + - libxkbcommon0 + - ttf-ubuntu-font-family + - dmz-cursor-theme + - light-themes + - adwaita-icon-theme + - gnome-themes-standard + - shared-mime-info + - libgdk-pixbuf2.0-0 + prime: + # libquazip5-1 pulls in Qt5 from bionic as a dependency. We don't + # want it in our snap, however, because we get a newer Qt5 from the + # kde-kf5 platform snap. + - "-usr/lib/x86_64-linux-gnu/libQt5*" + - "-usr/lib/x86_64-linux-gnu/libqt5*" slots: # Depending on in which environment we're running we either need # to use the system or session DBus so we also need to have one