Extract icons from tar

This commit is contained in:
2025-08-28 13:46:05 +02:00
parent 9d8c1a8895
commit f12160c2f3

View File

@@ -117,7 +117,6 @@ parts:
after:
- launcher
- desktop
- icons
build-packages:
- curl
- tar
@@ -125,8 +124,15 @@ parts:
mkdir -p "$CRAFT_PART_INSTALL/usr/lib"
curl -L -O https://github.com/zen-browser/desktop/releases/download/$SNAPCRAFT_PROJECT_VERSION/zen.linux-x86_64.tar.xz
tar xf zen.linux-x86_64.tar.xz -C "$CRAFT_PART_INSTALL/usr/lib"
organize:
usr/lib/zen/browser/chrome/icons/default/default16.png: usr/share/icons/hicolor/16x16/apps/zen-browser.png
usr/lib/zen/browser/chrome/icons/default/default32.png: usr/share/icons/hicolor/32x32/apps/zen-browser.png
usr/lib/zen/browser/chrome/icons/default/default48.png: usr/share/icons/hicolor/48x48/apps/zen-browser.png
usr/lib/zen/browser/chrome/icons/default/default64.png: usr/share/icons/hicolor/64x64/apps/zen-browser.png
usr/lib/zen/browser/chrome/icons/default/default128.png: usr/share/icons/hicolor/128x128/apps/zen-browser.png
prime:
- usr/lib/zen
- usr/share/icons/*
- usr/lib/*/libproxy
- usr/lib/*/libpci.so.*
# - usr/lib/*/opensc-pkcs11.so
@@ -189,27 +195,6 @@ parts:
override-prime: |
cp "$CRAFT_PROJECT_DIR/zen-browser.launcher" "$CRAFT_PRIME/"
chmod a+rwx "$CRAFT_PRIME/zen-browser.launcher"
icons:
plugin: nil
build-packages:
- inkscape
- curl
override-build: |
curl -L -O https://raw.githubusercontent.com/zen-browser/desktop/refs/heads/dev/docs/assets/zen-dark.svg
inkscape -w 16 -h 16 "$SNAPCRAFT_PART_BUILD/zen-dark.svg" -o "$CRAFT_PART_INSTALL/16.png"
inkscape -w 32 -h 32 "$SNAPCRAFT_PART_BUILD/zen-dark.svg" -o "$CRAFT_PART_INSTALL/32.png"
inkscape -w 48 -h 48 "$SNAPCRAFT_PART_BUILD/zen-dark.svg" -o "$CRAFT_PART_INSTALL/48.png"
inkscape -w 64 -h 64 "$SNAPCRAFT_PART_BUILD/zen-dark.svg" -o "$CRAFT_PART_INSTALL/64.png"
inkscape -w 128 -h 128 "$SNAPCRAFT_PART_BUILD/zen-dark.svg" -o "$CRAFT_PART_INSTALL/128.png"
organize:
16.png: usr/share/icons/hicolor/16x16/apps/zen-browser.png
32.png: usr/share/icons/hicolor/32x32/apps/zen-browser.png
48.png: usr/share/icons/hicolor/48x48/apps/zen-browser.png
64.png: usr/share/icons/hicolor/64x64/apps/zen-browser.png
128.png: usr/share/icons/hicolor/128x128/apps/zen-browser.png
prime:
- usr/share/icons/*
slots:
dbus-daemon: