[neon/snap-packaging/kf6-core/work.core24] /: Cleanup snap! now 2G
Scarlett Moore
null at kde.org
Mon Dec 16 14:55:40 GMT 2024
Git commit 72f55d019eb45e824b80ce3edcefb913f345ef9b by Scarlett Moore.
Committed on 16/12/2024 at 14:54.
Pushed by scarlettmoore into branch 'work.core24'.
Cleanup snap! now 2G
M +49 -49 snapcraft.yaml
https://invent.kde.org/neon/snap-packaging/kf6-core/-/commit/72f55d019eb45e824b80ce3edcefb913f345ef9b
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 0c5b684..4da9bb3 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -40,15 +40,25 @@ package-repositories:
key-server: keyserver.ubuntu.com
parts:
kf6-sdk:
+ plugin: nil
stage-snaps:
- kf6-core24-sdk/latest/stable
- kde-qt6-core24-sdk/latest/stable
stage:
- lib/*/bindtextdomain.so
- usr
- - lib/$CRAFT_ARCH_TRIPLET/*
+ - lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*
- etc/xdg/*
- etc/qt6/*
+ - -usr/lib/*/libdrm*
+ - -usr/share/doc/libdrm*
+ - -usr/lib/*/cmake
+ - -usr/lib/*/qt6/mkspecs
+ - -usr/share/qt6/doc
+ - -usr/share/man
+ - -usr/share/doc
+ - -usr/share/ECM
+ - -usr/include
- -etc/emacs
- -etc/X11/Xreset.d/README
- -etc/fonts/conf.d/README
@@ -66,7 +76,7 @@ parts:
- -usr/share/installed-tests
- -usr/share/maven-repo
- -usr/bin/dpkg*
- - -usr/bin/$CRAFT_ARCH_TRIPLET-*
+ - -usr/bin/$CRAFT_ARCH_TRIPLET_BUILD_FOR-*
- -usr/bin/g-ir-*
- -usr/bin/glib-compile-*
- -usr/bin/glib-gettextize
@@ -81,37 +91,6 @@ parts:
- -usr/bin/h2xs
- -usr/bin/make
- -usr/bin/make-first-existing-target
- - -usr/bin/mm-common-get
- - -usr/bin/mm-common-prepare
- - -usr/bin/nm
- - -usr/bin/objcopy
- - -usr/bin/objdump
- - -usr/bin/patch
- - -usr/bin/peas-demo
- - -usr/bin/pkg-config
- - -usr/bin/pl2pm
- - -usr/bin/pldd
- - -usr/bin/prove
- - -usr/bin/py3clean
- - -usr/bin/ranlib
- - -usr/bin/readelf
- - -usr/bin/rpcgen
- - -usr/bin/size
- - -usr/bin/strings
- - -usr/bin/strip
- - -usr/bin/wayland-scanner
- - -usr/bin/x86_64-pc-linux-gnu-pkg-config
- - -usr/bin/xgettext
- - -usr/bin/xsubpp
-
- - -usr/**/*.a
- - -usr/**/*.c
- - -usr/**/*.cpp
- - -usr/**/*.o
- - -usr/**/*.h
- - -usr/**/*.hpp
- - -usr/**/*.pc
-
- -usr/bin/g++*
- -usr/bin/*-linux-gnu-g++*
- -usr/bin/gcc*
@@ -119,20 +98,25 @@ parts:
- -usr/bin/python*
- -usr/bin/vala*
- -usr/bin/vapi*
-
- - -usr/include
-
- -usr/lib/*vala*
-
- -usr/share/perl
- -usr/share/vala*
- -usr/share/gir*
-
- -usr/bin/meson
- -usr/bin/ninja
- -usr/lib/python3/dist-packages/meson*
- -usr/share/devhelp/books
- plugin: nil
+ override-prime: |
+ set -eux
+ craftctl default
+ cd $CRAFT_PRIME
+ find . -type f,l -name "*.h" -exec bash -c "rm -f {}*" \;
+ find . -type f,l -name "*.a" -exec bash -c "rm -f {}*" \;
+ find . -type f,l -name "*.cpp" -exec bash -c "rm -f {}*" \;
+ find . -type f,l -name "*.c" -exec bash -c "rm -f {}*" \;
+ find . -type f,l -name "*.hpp" -exec bash -c "rm -f {}*" \;
+ find . -type f,l -name "*.pc" -exec bash -c "rm -f {}*" \;
+
kf6:
after: [kf6-sdk]
@@ -226,7 +210,13 @@ parts:
- xdg-user-dirs
- xkb-data
stage:
- - -usr/lib/$CRAFT_ARCH_TRIPLET/libLLVM*
+ - -usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libLLVM*
+ build-environment: &buildenvironment
+ - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+ - PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
+ - XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
+ - XDG_CONFIG_HOME: $CRAFT_STAGE/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
+ - LD_LIBRARY_PATH: "$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
override-build: |
set -eux
craftctl default
@@ -236,9 +226,9 @@ parts:
find . -type f,l -exec rm -f $CRAFT_PART_INSTALL/usr/{} \;
find . -type f,l -name "*.so*" -exec bash -c "rm -f $CRAFT_PART_INSTALL/usr/{}*" \;
cd $CRAFT_STAGE/usr/lib
- find . -type f,l -exec rm -f $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET/{} \;
- find . -type f,l -name "*.so*" -exec bash -c "rm -f $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET/{}*" \;
- cd $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET
+ find . -type f,l -exec rm -f $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/{} \;
+ find . -type f,l -name "*.so*" -exec bash -c "rm -f $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/{}*" \;
+ cd $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
find . -type f,l -exec rm -f $CRAFT_PART_INSTALL/usr/lib/{} \;
find . -type f,l -name "*.so*" -exec bash -c "rm -f $CRAFT_PART_INSTALL/usr/lib/{}*" \;
@@ -256,21 +246,27 @@ parts:
build-packages:
- libglib2.0-bin
- shared-mime-info
- build-environment:
- - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
- override-build: |
+ stage-packages:
+ - libglib2.0-bin
+ - shared-mime-info
+ build-environment: *buildenvironment
+ stage:
+ - usr/bin/glib-compile-schemas
+ - usr/bin/update-mime-database
+ override-stage: |
set -eux
craftctl default
- $CRAFT_STAGE/usr/bin/glib-compile-schemas $CRAFT_STAGE/usr/share/glib-2.0/schemas
- $CRAFT_STAGE/usr/bin/update-mime-database $CRAFT_STAGE/usr/share/mime
+ 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
kbuildsycoca6 --noincremental
command-chain:
- source: https://github.com/snapcore/snapcraft-desktop-integration.git
+ source: https://invent.kde.org/neon/snap-packaging/snapcraft-desktop-integration.git
source-type: git
+ source-branch: work.core24
source-subdir: kde-neon-6
plugin: make
make-parameters:
@@ -287,7 +283,11 @@ parts:
- python3-pip
- zip
- python3-apt
+ stage-packages:
+ - libgdk-pixbuf-2.0-0
+ build-environment: *buildenvironment
override-prime: |
+ craftctl default
set -eux
cd /snap/gtk-common-themes/current
More information about the Neon-commits
mailing list