From 5b1bd22b30d04ee04804f230d827ff4c8d4a46b9 Mon Sep 17 00:00:00 2001 From: Maximilian Federle Date: Thu, 16 Apr 2020 19:35:59 +0200 Subject: [PATCH] snap: Use kde-neon extension The kde-neon extension reduces our boilerplate in snapcraft.yaml and reduces the snap size considerably, as we do not need to ship any library that is already included in the kde-frameworks-5-core18 snap itself. This limits qelectrotech builds to the architectures supported by kde-frameworks-5-core18, i.e. only amd64. --- build-aux/snap/snapcraft.yaml | 59 ++++++----------------------------- 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/build-aux/snap/snapcraft.yaml b/build-aux/snap/snapcraft.yaml index 67b041e88..0efaa9283 100644 --- a/build-aux/snap/snapcraft.yaml +++ b/build-aux/snap/snapcraft.yaml @@ -15,45 +15,31 @@ layout: /usr/local/share/qelectrotech: bind: $SNAP/usr/local/share/qelectrotech /usr/share/libdrm/amdgpu.ids: - bind-file: $SNAP/usr/share/libdrm/amdgpu.ids - -plugs: - 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 + bind-file: $SNAP/kf5/usr/share/libdrm/amdgpu.ids apps: qelectrotech: - adapter: full command: usr/local/bin/qelectrotech command-chain: - - bin/desktop-launch - bin/qelectrotech-launch desktop: usr/local/share/applications/qelectrotech.desktop - plugs: &plugs [opengl, x11, unity7, wayland, desktop, desktop-legacy, home, removable-media, gsettings, network, cups-control] + extensions: [kde-neon] + plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control] environment: &env - __EGL_VENDOR_LIBRARY_DIRS: $SNAP/usr/share/glvnd/egl_vendor.d + __EGL_VENDOR_LIBRARY_DIRS: $SNAP/kf5/usr/share/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d + TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6 QT_QPA_PLATFORMTHEME: gtk3 QT_AUTO_SCREEN_SCALE_FACTOR: 1 - DISABLE_WAYLAND: 1 - TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6 qet-tb-generator: - command: desktop-launch $SNAP/bin/qet_tb_generator + command: bin/qelectrotech-launch $SNAP/bin/qet_tb_generator + extensions: [kde-neon] plugs: *plugs environment: *env dxf-to-qet: - command: desktop-launch $SNAP/bin/DXFtoQET + command: bin/DXFtoQET + extensions: [kde-neon] plugs: *plugs environment: *env @@ -64,34 +50,7 @@ parts: organize: '*': bin/ - desktop-qt5: - source: https://github.com/ubuntu/snapcraft-desktop-helpers.git - source-subdir: qt - plugin: make - make-parameters: ["FLAVOR=qt5"] - build-packages: - - build-essential - - 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 - - libqt5svg5 # for loading icon themes which are svg - - try: [appmenu-qt5] # not available on core18 - - locales-all - - xdg-user-dirs - - fcitx-frontend-qt5 - - cups-bsd # for lpr used for printing in general (needs cups-control) - qet-tb-generator: - after: [desktop-qt5] plugin: python python-version: python3 source: https://github.com/qelectrotech/qet_tb_generator.git