[neon/snap-packaging/kf5-core/work.core24] /: more fixes for core24

Scarlett Moore null at kde.org
Mon Feb 17 17:44:36 GMT 2025


Git commit 246c16b090ec7080c3955b35f0df426494816272 by Scarlett Moore.
Committed on 17/02/2025 at 17:44.
Pushed by scarlettmoore into branch 'work.core24'.

more fixes for core24

M  +124  -93   snapcraft.yaml

https://invent.kde.org/neon/snap-packaging/kf5-core/-/commit/246c16b090ec7080c3955b35f0df426494816272

diff --git a/snapcraft.yaml b/snapcraft.yaml
index 5d5559e..fc43d4e 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -39,97 +39,128 @@ package-repositories:
     url: http://origin.archive.neon.kde.org/user
     key-server: keyserver.ubuntu.com
 parts:
-    mesa:
-        after: []
-        plugin: nil
-        build-attributes:
-        - no-patchelf
-        build-packages: []
-        stage-packages:
-        - libgl1-mesa-dri
-        - libglx-mesa0
-        prime:
-        - "-lib/udev"
-        - "-usr/doc"
-        - "-usr/doc-base"
-        - "-usr/share/applications"
-        - "-usr/share/apport"
-        - "-usr/share/bug"
-        - "-usr/share/doc"
-        - "-usr/share/doc-base"
-        - "-usr/share/icons"
-        - "-usr/share/libdrm"
-        - "-usr/share/libwacom"
-        - "-usr/share/lintian"
-        - "-usr/share/man"
-        - "-usr/share/pkgconfig"
-    kf5:
-        stage-packages:
-        - mesa-utils-extra
-        - freeglut3-dev
-        - libglib2.0-0
-        - gstreamer1.0-x
-        - gstreamer1.0-plugins-base
-        - gstreamer1.0-pulseaudio
-        - gstreamer1.0-plugins-good
-        - gstreamer1.0-alsa
-        - gstreamer1.0-libav
-        - gstreamer1.0-tools
-        - libgstreamer1.0-0
-        - gstreamer1.0-plugins-bad
-        - gstreamer1.0-plugins-ugly
-        - libpulse0
-        - locales
-        - libc-bin
-        - gettext
-        - libdrm-dev
-        - mesa-va-drivers
-        -   on amd64:
-            - i965-va-driver
-            - intel-media-va-driver
-        stage-snaps:
-        - kf5-core24-sdk/latest/stable
-        - kde-qt5-core24-sdk/latest/stable
-        stage:
-        - -usr/lib/*/libdrm*
-        - -usr/share/doc/libdrm*
-        - -usr/lib/*/cmake
-        - -usr/lib/*/qt5/mkspecs
-        - -usr/share/qt5/doc
-        - -usr/share/man
-        - -usr/share/doc
-        - -usr/share/ECM
-        plugin: nil
-        override-prime: |
-            set -eux
-            craftctl default
-            cd $CRAFT_PRIME
-            find . -type f,l -name "*.h" -exec bash -c "rm -f {}*" \;
-    alsa-pulseaudio:
-        plugin: dump
-        source: .
-        override-pull: |
-            mkdir etc -p
-            cat > etc/asound.conf <<EOF
-            pcm.!default {
-                type pulse
-                fallback "sysdefault"
-                hint {
-                    show on
-                    description "Default ALSA Output (currently PulseAudio Sound Server)"
-                }
+  kf5:
+    stage-packages:
+      - libglib2.0-0
+      - gstreamer1.0-x
+      - gstreamer1.0-plugins-base
+      - gstreamer1.0-pulseaudio
+      - gstreamer1.0-plugins-good
+      - gstreamer1.0-alsa
+      - gstreamer1.0-libav
+      - gstreamer1.0-tools
+      - libgstreamer1.0-0
+      - gstreamer1.0-plugins-bad
+      - gstreamer1.0-plugins-ugly
+      - libpulse0
+      - locales
+      - libc-bin
+      - gettext
+    stage-snaps:
+      - kf5-core24-sdk/latest/stable
+      - kde-qt5-core24-sdk/latest/stable
+    stage:
+      - -usr/lib/*/cmake
+      - -usr/lib/*/qt5/mkspecs
+      - -usr/share/qt5/doc
+      - -usr/share/man
+      - -usr/share/doc
+      - -usr/share/ECM
+    plugin: nil
+    override-prime: |
+        set -eux
+        craftctl default
+        cd $CRAFT_PRIME
+        find . -type f,l -name "*.h" -exec bash -c "rm -f {}*" \;
+
+  fonts-config:
+    after: [ kf5 ]
+    plugin: nil
+    stage-packages: [ fontconfig-config, fonts-arphic-ukai, fonts-arphic-uming, fonts-beng-extra, fonts-dejavu-core, fonts-deva-extra, fonts-droid-fallback, fonts-gubbi, fonts-gujr-extra, fonts-guru-extra, fonts-lohit-beng-assamese, fonts-lohit-beng-bengali, fonts-lohit-deva, fonts-lohit-gujr, fonts-lohit-guru, fonts-lohit-knda, fonts-lohit-mlym, fonts-lohit-orya, fonts-lohit-taml, fonts-lohit-taml-classical, fonts-lohit-telu, fonts-noto-cjk, fonts-noto-mono, fonts-orya-extra, fonts-pagul, fonts-smc-anjalioldlipi, fonts-smc-chilanka, fonts-smc-dyuthi, fonts-smc-karumbi, fonts-smc-keraleeyam, fonts-smc-manjari, fonts-smc-meera, fonts-smc-rachana, fonts-smc-raghumalayalamsans, fonts-smc-suruma, fonts-smc-uroob, fonts-telu-extra, fonts-tlwg-garuda, fonts-tlwg-kinnari, fonts-tlwg-laksaman, fonts-tlwg-loma, fonts-tlwg-mono, fonts-tlwg-norasi, fonts-tlwg-typist, fonts-tlwg-typo, fonts-tlwg-umpush, fonts-tlwg-waree, fonts-urw-base35, language-selector-common ]
+    stage:
+      - etc/fonts
+      - usr/share/fontconfig
+
+  caches:
+    after: [ fonts-config ]
+    plugin: nil
+    build-packages:
+      - libglib2.0-bin
+      - shared-mime-info
+    stage-packages:
+      - libglib2.0-bin
+      - shared-mime-info
+    stage:
+      - usr/bin/glib-compile-schemas
+      - usr/bin/update-mime-database
+    override-stage: |
+      set -eux
+      craftctl default
+      glib-compile-schemas $CRAFT_STAGE/usr/share/glib-2.0/schemas
+      update-mime-database $CRAFT_STAGE/usr/share/mime
+
+      # the icons cache is rebuilt in 'cleanup' priming because it is there where the duplicated icons are removed
+
+      kbuildsycoca5 --noincremental
+
+  command-chain:
+    source: https://invent.kde.org/neon/snap-packaging/snapcraft-desktop-integration.git
+    source-type: git
+    source-branch: work.core24
+    source-subdir: kde-neon
+    plugin: make
+    make-parameters:
+      - PLATFORM_PLUG=$CRAFT_PROJECT_NAME
+      - WITH_GRAPHICS=false
+
+  cleanup:
+    after: [ caches ]
+    plugin: nil
+    source: https://github.com/canonical/gpu-snap.git
+    build-snaps:
+      - gtk-common-themes
+    build-packages:
+      - python3-pip
+      - zip
+      - python3-apt
+    stage-packages:
+      - libgdk-pixbuf-2.0-0
+    override-prime: |
+      craftctl default
+      set -eux
+
+      cd /snap/gtk-common-themes/current
+      find . -type f,l ! -name index.theme -exec rm -f $CRAFT_PRIME/usr/{} \;
+      cd $CRAFT_PRIME
+      for dir in usr/share/icons/*; do
+        if [ -f "$dir/index.theme" ]; then
+          $CRAFT_STAGE/usr/bin/gtk-update-icon-cache --force "$dir"
+        fi
+      done
+
+      rm -rf usr/share/doc
+      rm -rf usr/share/man
+
+      find . -type d -empty -delete
+
+       ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
+
+  alsa-pulseaudio:
+    plugin: dump
+    source: .
+    override-pull: |
+        mkdir etc -p
+        cat > etc/asound.conf <<EOF
+          pcm.!default {
+            type pulse
+            fallback "sysdefault"
+            hint {
+                show on
+                description "Default ALSA Output (currently PulseAudio Sound Server)"
             }
-            ctl.!default {
-                type pulse
-                fallback "sysdefault"
-            }
-            EOF
-    command-chain:
-        source: https://invent.kde.org/neon/snap-packaging/snapcraft-desktop-integration.git
-        source-type: git
-        source-subdir: kde-neon
-        plugin: make
-        make-parameters:
-        - PLATFORM_PLUG=$SNAPCRAFT_PROJECT_NAME
-        stage-packages:
-        - tox
+          }
+          ctl.!default {
+            type pulse
+            fallback "sysdefault"
+          }
+        EOF


More information about the Neon-commits mailing list