[arch-commits] Commit in gtk3/trunk (3 files)
Allan McRae
allan at archlinux.org
Wed Apr 27 12:25:38 UTC 2016
Date: Wednesday, April 27, 2016 @ 14:25:38
Author: allan
Revision: 266211
upgpkg: gtk3 3.20.3-2
add gtk-update-icon-cache hook
Added:
gtk3/trunk/gtk-update-icon-cache.hook
gtk3/trunk/gtk-update-icon-cache.script
Modified:
gtk3/trunk/PKGBUILD
------------------------------+
PKGBUILD | 13 ++++++++++---
gtk-update-icon-cache.hook | 13 +++++++++++++
gtk-update-icon-cache.script | 10 ++++++++++
3 files changed, 33 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-04-27 12:18:24 UTC (rev 266210)
+++ PKGBUILD 2016-04-27 12:25:38 UTC (rev 266211)
@@ -5,7 +5,7 @@
pkgbase=gtk3
pkgname=(gtk3 gtk-update-icon-cache)
pkgver=3.20.3
-pkgrel=1
+pkgrel=2
pkgdesc="GObject-based multi-platform GUI toolkit"
arch=(i686 x86_64)
url="http://www.gtk.org/"
@@ -15,9 +15,13 @@
makedepends=(gobject-introspection libcanberra gtk-doc)
license=(LGPL)
source=(https://download.gnome.org/sources/gtk+/${pkgver:0:4}/gtk+-$pkgver.tar.xz
- settings.ini)
+ settings.ini
+ gtk-update-icon-cache.hook
+ gtk-update-icon-cache.script)
sha256sums=('3834f3bf23b260b3e5ebfea41102e2026a8af29e36c3620edf4a5cf05e82f694'
- '01fc1d81dc82c4a052ac6e25bf9a04e7647267cc3017bc91f9ce3e63e5eb9202')
+ '01fc1d81dc82c4a052ac6e25bf9a04e7647267cc3017bc91f9ce3e63e5eb9202'
+ '496064a9dd6214bd58f689dd817dbdc4d7f17d42a8c9940a87018c3f829ce308'
+ 'bbe06e1b4e1ad5d61a4e703445a2bb93c6be918964d6dd76c0420c6667fa11eb')
prepare() {
cd gtk+-$pkgver
@@ -61,6 +65,9 @@
cd gtk+-$pkgver/gtk
install -Dm755 gtk-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
+
+ install -Dm644 "$srcdir"/gtk-update-icon-cache.hook "$pkgdir"/usr/share/libalpm/hooks/gtk-update-icon-cache.hook
+ install -Dm644 "$srcdir"/gtk-update-icon-cache.script "$pkgdir"/usr/share/libalpm/scripts/gtk-update-icon-cache
}
# vim:set et sw=4:
Added: gtk-update-icon-cache.hook
===================================================================
--- gtk-update-icon-cache.hook (rev 0)
+++ gtk-update-icon-cache.hook 2016-04-27 12:25:38 UTC (rev 266211)
@@ -0,0 +1,13 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/icons/*/
+Target = !usr/share/icons/*/?*
+
+[Action]
+Description = Updating icon theme caches...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/gtk-update-icon-cache
+NeedsTargets
Added: gtk-update-icon-cache.script
===================================================================
--- gtk-update-icon-cache.script (rev 0)
+++ gtk-update-icon-cache.script 2016-04-27 12:25:38 UTC (rev 266211)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+while read -r f; do
+ if [[ -e ${f}index.theme ]]; then
+ gtk-update-icon-cache -q "$f"
+ else
+ rm -f "${f}icon-theme.cache"
+ rmdir --ignore-fail-on-non-empty "$f"
+ fi
+done
More information about the arch-commits
mailing list