[neon/snap-packaging/kde-qt6-core-sdk] /: Move pkgconfig to stage override, fix the find regex, rename cleanup.
Scarlett Moore
null at kde.org
Fri May 31 13:08:18 BST 2024
Git commit 2afce703d89e8fba11f59582a5b280248bec9795 by Scarlett Moore.
Committed on 31/05/2024 at 12:07.
Pushed by scarlettmoore into branch 'master'.
Move pkgconfig to stage override, fix the find regex, rename cleanup.
M +11 -8 snapcraft.yaml
https://invent.kde.org/neon/snap-packaging/kde-qt6-core-sdk/-/commit/2afce703d89e8fba11f59582a5b280248bec9795
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 39e3b55..ce8c4f4 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -364,6 +364,16 @@ parts:
organize:
usr/share/pkgconfig: usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR: usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
+ override-stage: |
+ craftctl default
+ for PC in $(find $CRAFT_STAGE -type f,l -name "*.pc")
+ do
+ -exec bash -c "sed -i 's:/root/stage:/snap/$CRAFT_PROJECT_NAME/current:g' $PC" \;
+ -exec bash -c "sed -i 's|libdir=/usr|libdir=${prefix}|g' $PC" \;
+ -exec bash -c "sed -i 's|includedir=/usr|includedir=${prefix}|g' $PC" \;
+ -exec bash -c "sed -i 's|exec_prefix=/usr|exec_prefix=${prefix}|g' $PC" \;
+ -exec bash -c "sed -i 's|modlibexecdir=/usr|modlibexecdir=${prefix}|g' $PC" \;
+ done
prime:
- -etc
- -lib
@@ -375,18 +385,11 @@ parts:
- -usr/share/lintian
- -usr/share/man
- fix-pkgconfig:
+ cleanup:
plugin: nil
after: [debs]
override-stage: |
set -eux
- for PC in $(find . -path "*/pkgconfig/*.pc")
- do
- sed -i 's:/root/stage:/snap/$CRAFT_PROJECT_NAME/current:g' $PC
- sed -i 's|libdir=/usr|libdir=${prefix}|g' $PC
- sed -i 's|includedir=/usr|includedir=${prefix}|g' $PC
- sed -i 's|exec_prefix=/usr|exec_prefix=${prefix}|g' $PC
- sed -i 's|modlibexecdir=/usr|modlibexecdir=${prefix}|g' $PC
done
for snap in "core22" "ffmpeg-2204-sdk"; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" \;
More information about the Neon-commits
mailing list