summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAdrian Perez de Castro2015-07-22 21:20:33 +0300
committerAdrian Perez de Castro2015-07-22 21:20:33 +0300
commitaa96311828e2bf916777f24084908428e647ed09 (patch)
tree29645939f41c9c7d8f128d0ac2ff97a0cb417ef1 /PKGBUILD
parent8b2f04985f0f047fe672a8814dd73c57b260312b (diff)
downloadaur-aa96311828e2bf916777f24084908428e647ed09.tar.gz
Allow setting a custom theme inheritance
This adds a prepare() function which will edit the "Inherits=" line from the "index.theme" file if the "_inherits" variable is not empty. Patch based on a suggestion by TrialnError <autumn-wind@web.de>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD26
1 files changed, 24 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fb0b5d12e677..830dea48fcd7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,25 @@
# Maintainer: Adrián Pérez de Castro <adrian@perezdecastro.org>
+
+# Set to non-empty value to change the "Inherits=..." value in
+# the "index.theme"; the value will be inserted as-is in the file.
+# For example the following would make the theme inherit from the
+# "nouveGnome" theme:
+#
+# _inherits='nouveGnome,hicolor'
+#
+# The default value speficied by the theme is "Moka,gnome,hicolor".
+# Note that most of the time "hicolor" should be always given as
+# last possible fall-back icon theme, as it will be always present.
+#
+_inherits=''
+
pkgname='vertex-icons-git'
pkgdesc='A Gnome icon theme to match the Vertex Gtk theme'
pkgver=r16.f27e47e
-pkgrel=2
+pkgrel=3
url='https://github.com/horst3180/Vertex-Icons/'
-depends=('moka-icon-theme-git' 'faba-mono-icons-git')
+optdepends=('moka-icon-theme-git: Default fall-back icon theme'
+ 'faba-mono-icons-git: Default fall-back icon theme')
arch=('any')
license='GPL'
source=("${pkgname}::git://github.com/horst3180/Vertex-Icons.git")
@@ -19,6 +34,13 @@ pkgver () {
)
}
+prepare () {
+ if [[ -n ${_inherits} ]] ; then
+ # Change "Inherits=" line in "index.theme"
+ sed -i "s/^Inherits=.*$/Inherits=${_inherits}/" "${pkgname}/index.theme"
+ fi
+}
+
package () {
cd "${pkgname}"
install -dm755 "${pkgdir}/usr/share/icons/Vertex-Icons"