summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShadowKyogre2018-07-12 11:02:04 -0700
committerShadowKyogre2018-07-12 11:02:04 -0700
commit94daa9af61ec20d3ed72fd5b7e0f9ffd0d994258 (patch)
tree0a5dae94766f2723b9468b02780e4023007110b5
parenta8c8c3eaac31b4495261ccf9538f4d223f4f1d42 (diff)
downloadaur-94daa9af61ec20d3ed72fd5b7e0f9ffd0d994258.tar.gz
Handle generating Compiz exclusive icon caches
This is needed for CCSM plugin icons and such.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD17
-rw-r--r--compiz-gtk-remove-icon-cache.hook11
-rw-r--r--compiz-gtk-remove-icon-cache.script7
-rw-r--r--compiz-gtk-update-icon-cache.hook13
-rw-r--r--compiz-gtk-update-icon-cache.script10
6 files changed, 68 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1481aaacbb7..d8295ee3cce 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Tue Jun 5 05:08:21 UTC 2018
pkgbase = compiz-core-git
pkgdesc = This is the latest git release of Compiz without DE deps
- pkgver = 0.8.14.r36.g493a3807
+ pkgver = 0.8.14.r43.g09b96469
pkgrel = 1
url = https://gitlab.com/compiz/compiz-core
arch = i686
@@ -24,7 +22,15 @@ pkgbase = compiz-core-git
options = !libtool
options = !emptydirs
source = git+https://gitlab.com/compiz/compiz-core.git
+ source = compiz-gtk-update-icon-cache.hook
+ source = compiz-gtk-update-icon-cache.script
+ source = compiz-gtk-remove-icon-cache.hook
+ source = compiz-gtk-remove-icon-cache.script
sha1sums = SKIP
+ sha1sums = 157cc6fd3930d715a076a66a61969b99951871e5
+ sha1sums = a40694c0fbcc5179a42fb6ced0842ef7dda9570e
+ sha1sums = c40f1b1135695f4db834810d1307defe36ea1eab
+ sha1sums = a572626cef5c368f54f08f99b51757ef6790a81c
pkgname = compiz-core-git
pkgdesc = This is the latest git release of Compiz without DE deps (Core w/o decorator)
@@ -40,7 +46,7 @@ pkgname = compiz-core-git
depends = hicolor-icon-theme
depends = libxi
depends = libxcursor
- provides = compiz-core=0.8.14.r36.g493a3807
+ provides = compiz-core=0.8.14.r43.g09b96469
conflicts = compiz
conflicts = compiz-core
@@ -56,6 +62,6 @@ pkgname = compiz-gtk-git
depends = libxcomposite
depends = libxinerama
depends = compiz-core-git
- provides = compiz-gtk=0.8.14.r36.g493a3807
+ provides = compiz-gtk=0.8.14.r43.g09b96469
conflicts = compiz-gtk
diff --git a/PKGBUILD b/PKGBUILD
index ea842e4737f..ef0e7fae2d2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ _upstream="compiz-core"
pkgbase=compiz-core-git
pkgname=(compiz-core-git compiz-gtk-git)
-pkgver=0.8.14.r36.g493a3807
+pkgver=0.8.14.r43.g09b96469
pkgrel=1
pkgdesc="This is the latest git release of Compiz without DE deps"
url="https://gitlab.com/compiz/${_upstream}"
@@ -23,6 +23,10 @@ makedepends=('intltool' 'libice')
options=(!libtool !emptydirs)
source=(
"git+https://gitlab.com/compiz/${_upstream}.git"
+ compiz-gtk-update-icon-cache.hook
+ compiz-gtk-update-icon-cache.script
+ compiz-gtk-remove-icon-cache.hook
+ compiz-gtk-remove-icon-cache.script
)
sha1sums=('SKIP')
@@ -105,6 +109,11 @@ package_compiz-core-git() {
rm "$fname"
fi
done
+
+ install -Dm644 "${srcdir}/compiz-gtk-update-icon-cache.hook" "${pkgdir}/usr/share/libalpm/hooks/compiz-gtk-update-icon-cache.hook"
+ install -Dm755 "${srcdir}/compiz-gtk-update-icon-cache.script" "${pkgdir}/usr/share/libalpm/scripts/compiz-gtk-update-icon-cache"
+ install -Dm644 "${srcdir}/compiz-gtk-remove-icon-cache.hook" "${pkgdir}/usr/share/libalpm/hooks/compiz-gtk-remove-icon-cache.hook"
+ install -Dm755 "${srcdir}/compiz-gtk-remove-icon-cache.script" "${pkgdir}/usr/share/libalpm/scripts/compiz-gtk-remove-icon-cache"
}
package_compiz-gtk-git()
@@ -146,3 +155,9 @@ package_compiz-gtk-git()
fi
done
}
+
+sha1sums=('SKIP'
+ '157cc6fd3930d715a076a66a61969b99951871e5'
+ 'a40694c0fbcc5179a42fb6ced0842ef7dda9570e'
+ 'c40f1b1135695f4db834810d1307defe36ea1eab'
+ 'a572626cef5c368f54f08f99b51757ef6790a81c')
diff --git a/compiz-gtk-remove-icon-cache.hook b/compiz-gtk-remove-icon-cache.hook
new file mode 100644
index 00000000000..1e9fc8ed172
--- /dev/null
+++ b/compiz-gtk-remove-icon-cache.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Remove
+Target = usr/share/compiz/icons/*/
+Target = !usr/share/compiz/icons/*/?*
+
+[Action]
+Description = Removing Compiz plugin icon caches...
+When = PreTransaction
+Exec = /usr/share/libalpm/scripts/compiz-gtk-remove-icon-cache
+NeedsTargets
diff --git a/compiz-gtk-remove-icon-cache.script b/compiz-gtk-remove-icon-cache.script
new file mode 100644
index 00000000000..778173914a4
--- /dev/null
+++ b/compiz-gtk-remove-icon-cache.script
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+while read -r f; do
+ if [[ -d ${f}scalable ]]; then
+ rm -f "${f}icon-theme.cache"
+ fi
+done
diff --git a/compiz-gtk-update-icon-cache.hook b/compiz-gtk-update-icon-cache.hook
new file mode 100644
index 00000000000..beb21a3b625
--- /dev/null
+++ b/compiz-gtk-update-icon-cache.hook
@@ -0,0 +1,13 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/compiz/icons/*/
+Target = !usr/share/compiz/icons/*/?*
+
+[Action]
+Description = Updating Compiz plugin icon caches...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/compiz-gtk-update-icon-cache
+NeedsTargets
diff --git a/compiz-gtk-update-icon-cache.script b/compiz-gtk-update-icon-cache.script
new file mode 100644
index 00000000000..8d9b5538405
--- /dev/null
+++ b/compiz-gtk-update-icon-cache.script
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+while read -r f; do
+ if [[ -d ${f}scalable ]]; then
+ gtk-update-icon-cache -t -q "$f"
+ elif [[ -d $f ]]; then
+ rm -f "${f}icon-theme.cache"
+ rmdir --ignore-fail-on-non-empty "$f"
+ fi
+done