[neon/snap-packaging/elisa-snap] /: New release. Set ffmpeg as plug and update env variables to look in sdk.

Scarlett Moore null at kde.org
Thu Jul 18 10:59:00 BST 2024


Git commit 42ffd35d72b2599f7d43f174b3d3016eeca83683 by Scarlett Moore.
Committed on 18/07/2024 at 09:56.
Pushed by scarlettmoore into branch 'master'.

New release. Set ffmpeg as plug and update env variables to look in sdk.

M  +16   -60   snapcraft.yaml

https://invent.kde.org/neon/snap-packaging/elisa-snap/-/commit/42ffd35d72b2599f7d43f174b3d3016eeca83683

diff --git a/snapcraft.yaml b/snapcraft.yaml
index 58b908a..7fdebe8 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -22,11 +22,9 @@ apps:
         - removable-media
         - screen-inhibit-control
         - pulseaudio
-        command-chain:
-        - snap/command-chain/desktop-launch6
 environment:
-  LD_LIBRARY_PATH: "/snap/kf6-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:/snap/ffmpeg-2204/current/usr/lib:$SNAP/usr/lib:$SNAP/lib/:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/elisa:/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio:/usr/lib:/lib"
-  PATH: /snap/ffmpeg-2204/current/usr/bin:/snap/kf6-core22/current/usr/bin:$SNAP/usr/bin:/usr/bin:/bin
+  LD_LIBRARY_PATH: "/snap/kf6-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib:$SNAP/lib/:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/elisa:/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio:$SNAP/ffmpeg-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:${LD_LIBRARY_PATH}"
+  PATH: $SNAP/kf6/usr/bin:$SNAP/usr/bin:$SNAP/ffmpeg-platform/usr/bin:${PATH}
   XDG_DATA_DIRS: $SNAP/usr/share:/snap/kf6-core22/current/usr/share:$SNAP/.local/usr/share:$SNAP/usr/share:$SNAP/data-dir
   XDG_CONFIG_HOME: $SNAP/etc/xdg:/snap/kf6-core22/current/etc/xdg:/etc/xdg
   GST_PLUGIN_PATH: "$SNAP/kf6/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gstreamer-1.0"
@@ -34,48 +32,7 @@ environment:
   GST_PLUGIN_SCANNER: "$SNAP/kf6/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner"
   ALSA_CONFIG_PATH: "$SNAP/kf6/etc/asound.conf"
   QT_MEDIA_BACKEND: "ffmpeg"
-  QT_PLUGIN_PATH: /snap/kf6-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins
-plugs:
-    gtk-3-themes:
-        interface: content
-        target: $SNAP/data-dir/themes
-        default-provider: gtk-common-themes
-    kde-gtk3-themes:
-        interface: content
-        target: $SNAP/data-dir/themes
-        default-provider: qt-common-themes
-    gtk-2-themes:
-        interface: content
-        target: $SNAP/data-dir/themes
-        default-provider: gtk-common-themes
-    kde-gtk2-themes:
-        interface: content
-        target: $SNAP/data-dir/themes
-        default-provider: qt-common-themes
-    qt-icon-themes:
-        interface: content
-        target: $SNAP/data-dir/icons
-        default-provider: qt-common-themes
-    gtk-icon-themes:
-        interface: content
-        target: $SNAP/data-dir/icons
-        default-provider: gtk-common-themes
-    qt-sound-themes:
-        interface: content
-        target: $SNAP/data-dir/sounds
-        default-provider: qt-common-themes
-    gtk-sound-themes:
-        interface: content
-        target: $SNAP/data-dir/sounds
-        default-provider: gtk-common-themes
-    qt-6-themes:
-        interface: content
-        target: $SNAP/kf6
-        default-provider: qt-common-themes
-    dot-config-kde-globals:
-        interface: personal-files
-        read:
-            - $HOME/.config/kdeglobals
+  QT_PLUGIN_PATH: $SNAP/kf6/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins
 layout:
   /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/alsa-lib:
     bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/alsa-lib
@@ -88,6 +45,11 @@ slots:
         interface: dbus
         name: org.mpris.MediaPlayer2.elisa
         bus: session
+plugs:
+    ffmpeg-2204:
+        interface: content
+        target: ffmpeg-platform # the folder where this content snap will be mounted
+        default-provider: ffmpeg-2204
 package-repositories:
 -   type: apt
     components:
@@ -112,8 +74,6 @@ parts:
         - libasound2-plugins
         - libasound2-data
         - libpulse0
-        stage-snaps:
-        - ffmpeg-2204
         source: https://invent.kde.org/multimedia/elisa.git
         source-branch: release/24.05
         cmake-parameters:
@@ -133,28 +93,23 @@ parts:
         - -DCMAKE_INSTALL_LIBDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
         - --log-level=STATUS
         - -DCMAKE_LIBRARY_PATH=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
-        - "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core22-sdk/current\\;/snap/kf6-core22-sdk/current/usr"
-        - "-DCMAKE_PREFIX_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core22-sdk/current\\;/snap/kf6-core22-sdk/current/usr"
+        - "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core22-sdk/current/usr\\;/snap/kf6-core22-sdk/current/usr\\;/snap/ffmpeg-2204-sdk/current/usr"
+        - "-DCMAKE_PREFIX_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core22-sdk/current\\;/snap/kf6-core22-sdk/current\\;/snap/ffmpeg-2204-sdk/current"
         build-environment:
-            - PATH: /snap/kde-qt6-core22-sdk/current/usr/bin${PATH:+:$PATH}
-            - PKG_CONFIG_PATH: /snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
+            - PATH: /snap/kde-qt6-core22-sdk/current/usr/bin:/snap/kf6-core22-sdk/current/usr/bin:/snap/ffmpeg-2204-sdk/current/usr/bin${PATH:+:$PATH}
+            - PKG_CONFIG_PATH: /snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig:/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig:/snap/ffmpeg-2204-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
             - XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kde-qt6-core22-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
             - XDG_CONFIG_HOME: $CRAFT_STAGE/etc/xdg:/snap/kde-qt6-core22-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
-            - LD_LIBRARY_PATH: "/snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/snap/kde-qt6-core22-sdk/current/usr/lib:/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/snap/kf6-core22-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+            - LD_LIBRARY_PATH: "/snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/snap/kde-qt6-core22-sdk/current/usr/lib:/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/snap/kf6-core22-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/snap/ffmpeg-2204-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
         prime:
         - -usr/lib/*/cmake/*
         - -usr/include/*
         - -usr/share/ECM/*
         - -usr/share/man/*
-        - -usr/share/icons/breeze-dark*
         - -usr/bin/X11
-        - -usr/lib/gcc/$SNAPCRAFT_ARCH_TRIPLET/6.0.0
+        - -usr/lib/gcc/$CRAFT_ARCH_TRIPLET_BUILD_FOR/6.0.0
         - -usr/lib/aspell/*
         - -usr/share/lintian
-        override-build: |
-            craftctl default
-
-            sed -i "${CRAFT_PART_INSTALL}/usr/share/applications/org.kde.elisa.desktop" -e 's|Icon=elisa$|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/elisa.svg|'
     cleanup:
         after:
         - elisa
@@ -162,9 +117,10 @@ parts:
         build-snaps:
         - core22
         - kf6-core22
+        - qt-common-themes
         override-prime: |
             set -eux
-            for snap in "core22" "kf6-core22"; do
+            for snap in "core22" "kf6-core22" "qt-common-themes"; do
                 cd "/snap/$snap/current" && find . -type f,l -exec rm -rf "${CRAFT_PRIME}/{}" \;
             done
 


More information about the Neon-commits mailing list