From e78d9d46d294163e78edf6b9b16367a684076172 Mon Sep 17 00:00:00 2001 From: Rune Morling Date: Fri, 27 Dec 2024 02:16:40 +0100 Subject: [PATCH] boulder: Add `%gtk_update_icon_cache` action macro Most icon themes benefit from having their icon cache pre-generated at build time. The invocation for doing so follows a distinct pattern, hence this macro could perhaps be gainfully used as a simpler substitution. For convenience, the macro dependes on `binary(gtk-update-icon-cache)`. Signed-off-by: Rune Morling --- boulder/data/macros/actions/misc.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/boulder/data/macros/actions/misc.yaml b/boulder/data/macros/actions/misc.yaml index c867af4b..f276e532 100644 --- a/boulder/data/macros/actions/misc.yaml +++ b/boulder/data/macros/actions/misc.yaml @@ -1,5 +1,16 @@ actions: + - gtk_update_icon_cache: + description: Pregenerate icon cache at build time + example: | + %gtk_update_icon_cache + command: | + for i in %(installroot)%(datadir)/icons/*/; do + gtk-update-icon-cache -f $i + done + dependencies: + - binary(gtk-update-icon-cache) + - install_bin: description: Install files to %(bindir) example: |