summaryrefslogtreecommitdiff
path: root/recipes/shr/gtk-theme.inc
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2009-11-15 19:27:26 +0100
committerKlaus Kurzmann <mok@fluxnetz.de>2009-11-15 19:55:58 +0100
commitf3a637b546878789dcef4d1a3c78a18c765e7ae2 (patch)
tree5a878706c9e00aa617402cd7d6d1e0b9aef31ed7 /recipes/shr/gtk-theme.inc
parent0c8459574b08a9e773c1e7e79c182fe779d04e15 (diff)
shr themes: new recipes from shr/merge
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
Diffstat (limited to 'recipes/shr/gtk-theme.inc')
-rw-r--r--recipes/shr/gtk-theme.inc33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/shr/gtk-theme.inc b/recipes/shr/gtk-theme.inc
new file mode 100644
index 0000000000..449d0e0b28
--- /dev/null
+++ b/recipes/shr/gtk-theme.inc
@@ -0,0 +1,33 @@
+RPROVIDES_${PN} += "virtual/theme-gtk"
+RDEPENDS = "gtk+"
+SECTION = "gtk"
+
+inherit update-alternatives
+
+SRC_URI += "file://gtk-theme/gtkrc.${PN}"
+
+do_install() {
+ install -d "${D}${datadir}/themes/${PN}/gtk-2.0"
+ cp -r "${S}/./" "${D}${datadir}/themes/${PN}/gtk-2.0"
+ install -d ${D}${sysconfdir}/gtk-2.0/
+ install -m 0644 ${WORKDIR}/gtk-theme/gtkrc.${PN} ${D}${sysconfdir}/gtk-2.0/gtkrc.${PN}
+}
+
+FILES_${PN} = "${datadir}/themes/${PN}/ \
+ ${sysconfdir}/gtk-2.0/gtkrc.${PN} \
+ "
+
+ALTERNATIVE_NAME = "gtk-theme"
+ALTERNATIVE_LINK = "${sysconfdir}/gtk-2.0/gtkrc"
+ALTERNATIVE_PATH = "${sysconfdir}/gtk-2.0/gtkrc.${PN}"
+
+pkg_postinst() {
+ if [[ -e ${ALTERNATIVE_LINK} && ! -h ${ALTERNATIVE_LINK} ]] ; then
+ echo "warn: ${ALTERNATIVE_LINK} exists and it's not a link!"
+ echo "warn: It will be replaced with link managed by update-alternatives"
+ echo "warn: Moving ${ALTERNATIVE_LINK} to ${ALTERNATIVE_LINK}.old."
+ echo "warn: It should be empty but probably isn't!"
+ echo "warn: Check what's left there and remove it manually."
+ mv -f ${ALTERNATIVE_LINK} ${ALTERNATIVE_LINK}.old
+ fi
+}