[oe-commits] Martin Jansa : shr-theme-gtk-e17lookalike: rename to gtk-theme-e17lookalike , simplify shr gtk-themes and add PN-gtkrc

git version control git at git.openembedded.org
Wed Mar 2 13:57:38 UTC 2011


Module: openembedded.git
Branch: master
Commit: 59c3f3a5fb2e9a80becb3f3525a652b15571bd9d
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=59c3f3a5fb2e9a80becb3f3525a652b15571bd9d

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Wed Mar  2 14:41:30 2011 +0100

shr-theme-gtk-e17lookalike: rename to gtk-theme-e17lookalike, simplify shr gtk-themes and add PN-gtkrc

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../gtkrc}                                         |    2 +-
 ...kalike_git.bb => gtk-theme-e17lookalike_git.bb} |    4 +-
 .../gtkrc.gtk-theme-neo => gtk-theme-neo/gtkrc}    |    0
 recipes/shr/gtk-theme-neo_git.bb                   |    3 +-
 recipes/shr/gtk-theme.inc                          |   31 +++++++-------------
 recipes/tasks/task-shr-minimal.bb                  |    4 +-
 6 files changed, 18 insertions(+), 26 deletions(-)

diff --git a/recipes/shr/gtk-theme/gtkrc.shr-theme-gtk-e17lookalike b/recipes/shr/gtk-theme-e17lookalike/gtkrc
similarity index 59%
rename from recipes/shr/gtk-theme/gtkrc.shr-theme-gtk-e17lookalike
rename to recipes/shr/gtk-theme-e17lookalike/gtkrc
index c63cd73..998d8c0 100644
--- a/recipes/shr/gtk-theme/gtkrc.shr-theme-gtk-e17lookalike
+++ b/recipes/shr/gtk-theme-e17lookalike/gtkrc
@@ -1,3 +1,3 @@
 gtk-font-name = "Sans 5"
-gtk-theme-name = "shr-theme-gtk-e17lookalike"
+gtk-theme-name = "gtk-theme-e17lookalike"
 gtk-icon-theme-name = "openmoko-standard"
diff --git a/recipes/shr/shr-theme-gtk-e17lookalike_git.bb b/recipes/shr/gtk-theme-e17lookalike_git.bb
similarity index 80%
rename from recipes/shr/shr-theme-gtk-e17lookalike_git.bb
rename to recipes/shr/gtk-theme-e17lookalike_git.bb
index 388e2c2..6396518 100644
--- a/recipes/shr/shr-theme-gtk-e17lookalike_git.bb
+++ b/recipes/shr/gtk-theme-e17lookalike_git.bb
@@ -1,8 +1,8 @@
 DESCRIPTION = "A gtk theme that looks like e17"
 LICENSE = "MIT BSD"
-SRCREV = "1cc80e26a4558dfc2268b349d9a1f468e515bcfb"
+SRCREV = "5c01117b97ab823b5dd298c08759093a81ac5456"
 PV = "0.1.1+gitr${SRCPV}"
-PR = "r6"
+PR = "r7"
 PACKAGE_ARCH = "all"
 
 SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
diff --git a/recipes/shr/gtk-theme/gtkrc.gtk-theme-neo b/recipes/shr/gtk-theme-neo/gtkrc
similarity index 100%
rename from recipes/shr/gtk-theme/gtkrc.gtk-theme-neo
rename to recipes/shr/gtk-theme-neo/gtkrc
diff --git a/recipes/shr/gtk-theme-neo_git.bb b/recipes/shr/gtk-theme-neo_git.bb
index c5f1875..627352b 100644
--- a/recipes/shr/gtk-theme-neo_git.bb
+++ b/recipes/shr/gtk-theme-neo_git.bb
@@ -3,11 +3,12 @@ HOMEPAGE = "http://jmccloud.jm.funpic.de"
 AUTHOR = "Jesus McCloud <bernd.pruenster at gmail.com"
 RDEPENDS_${PN} += "icon-theme-neo"
 RSUGGESTS_${PN} = "elementary-theme-neo e-wm-theme-illume-neo gpe-theme-neo icon-theme-neo"
+PACKAGE_ARCH = "all"
 LICENSE = "unknown"
 
 SRCREV = "f847105c5ef5d488a4bce0c0a85d572c3509d56f"
 PV = "0.3+gitr${SRCPV}"
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
 
diff --git a/recipes/shr/gtk-theme.inc b/recipes/shr/gtk-theme.inc
index bc985c0..70a4364 100644
--- a/recipes/shr/gtk-theme.inc
+++ b/recipes/shr/gtk-theme.inc
@@ -2,32 +2,23 @@ RPROVIDES_${PN} += "virtual/theme-gtk"
 RDEPENDS_${PN} = "gtk+"
 SECTION = "gtk"
 
-inherit update-alternatives
-
-SRC_URI += "file://gtk-theme/gtkrc.${PN}"
+SRC_URI += "file://gtkrc"
 
 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}
+        install -m 0644 ${WORKDIR}/gtkrc ${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}"
+PACKAGES += "${PN}-gtkrc"
+FILES_${PN} = "${datadir}/themes/${PN}/"
+FILES_${PN}-gtkrc = "${sysconfdir}/gtk-2.0/gtkrc.${PN}"
+RDEPENDS_${PN} += "${PN}-gtkrc"
 
-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
+pkg_postinst_${PN}-gtkrc () {
+        update-alternatives --install ${sysconfdir}/gtk-2.0/gtkrc gtk-theme ${sysconfdir}/gtk-2.0/gtkrc.${PN} 10
+}
+pkg_prerm_${PN}-gtkrc () {
+        update-alternatives --remove gtk-theme ${sysconfdir}/gtk-2.0/gtkrc.${PN}
 }
diff --git a/recipes/tasks/task-shr-minimal.bb b/recipes/tasks/task-shr-minimal.bb
index a3377cc..c3c8f97 100644
--- a/recipes/tasks/task-shr-minimal.bb
+++ b/recipes/tasks/task-shr-minimal.bb
@@ -1,5 +1,5 @@
 DESCRIPTION = "SHR Lite Image Feed"
-PR = "r38"
+PR = "r39"
 PV = "2.0"
 LICENSE = "GPL"
 
@@ -138,7 +138,7 @@ RDEPENDS_${PN}-apps = "\
 
 
 RDEPENDS_${PN}-gtk = "\
-  shr-theme-gtk-e17lookalike \
+  gtk-theme-e17lookalike \
   vala-terminal \
   pyphonelog \
   matchbox-keyboard-im \





More information about the Openembedded-commits mailing list