diff options
author | Adrian Perez de Castro | 2015-07-22 21:20:33 +0300 |
---|---|---|
committer | Adrian Perez de Castro | 2015-07-22 21:20:33 +0300 |
commit | aa96311828e2bf916777f24084908428e647ed09 (patch) | |
tree | 29645939f41c9c7d8f128d0ac2ff97a0cb417ef1 | |
parent | 8b2f04985f0f047fe672a8814dd73c57b260312b (diff) | |
download | aur-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>
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 27 insertions, 5 deletions
@@ -1,13 +1,13 @@ pkgbase = 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/ install = vertex-icons-git.install arch = any license = GPL - depends = moka-icon-theme-git - depends = faba-mono-icons-git + optdepends = moka-icon-theme-git: Default fall-back icon theme + optdepends = faba-mono-icons-git: Default fall-back icon theme source = vertex-icons-git::git://github.com/horst3180/Vertex-Icons.git sha512sums = SKIP @@ -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" |