gpe-icons: cleanup include file a bit, don't inherit update-alternatives, just do...
authorMartin Jansa <Martin.Jansa@gmail.com>
Wed, 13 Jan 2010 12:05:07 +0000 (13:05 +0100)
committerMartin Jansa <Martin.Jansa@gmail.com>
Thu, 14 Jan 2010 23:49:57 +0000 (00:49 +0100)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
recipes/gpe-icons/gpe-icons.inc
recipes/gpe-icons/gpe-icons_0.25.bb
recipes/gpe-icons/gpe-theme-neo_git.bb

index 18dd39b..fca142a 100644 (file)
@@ -1,17 +1,23 @@
 SECTION = "gpe"
 RDEPENDS += "gdk-pixbuf-loader-png"
 
-INHERIT = "gpe"
-INHERIT_shr = "gpe update-alternatives"
-inherit ${INHERIT}
+#only icons present in the package
+PACKAGE_ARCH = "all"
 
-INC_PR = "r4"
+INC_PR = "r5"
 
 ALTERNATIVE_NAME = "gpe-pixmaps"
 ALTERNATIVE_LINK = "${datadir}/gpe/pixmaps"
 ALTERNATIVE_PATH = "${datadir}/gpe/pixmaps.${PN}"
 ALTERNATIVE_PRIORITY ?= 1
 
+# copy icons from other alternatives if they are not provided by current alternative
+# ie gpe-sketchbook install own icon to pixmaps dir even before gpe-icons_*.bb is installed
+# so if we switch pixmaps link to neo theme, there would be no icon for gpe-sketchbook 
+# unless we copy it to neo theme in postinst too
+# inherit update-alternatives is not used, because not all distributions want to use it 
+# and conditional inherit is a bit difficult to use (inherit ${GPE_INHERIT} works, but only if we always want at least 1 bbclass)
+
 pkg_postinst_shr() {
         if [[ -e ${ALTERNATIVE_LINK} && ! -h ${ALTERNATIVE_LINK} ]] ; then
                 echo "warn: ${ALTERNATIVE_LINK} exists and it's not a link!"
@@ -35,4 +41,9 @@ pkg_postinst_shr() {
                           fi; 
                 done
         done
+        update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY}
+}
+
+pkg_postrm_shr() {
+        update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
 }
index 7070e12..14f7f26 100644 (file)
@@ -1,13 +1,10 @@
 DESCRIPTION = "Common icons for GPE"
 LICENSE = "GPL"
-SECTION = "gpe"
-
-RDEPENDS = "gdk-pixbuf-loader-png"
 
 PR = "${INC_PR}.0"
 
-#only icons present in the package
-PACKAGE_ARCH = "all"
+inherit gpe
+
 FILES_${PN} = "${datadir}/gpe"
 
 #Only SHR is using u-a for gpe-icons
index 3f0f7b1..402eef6 100644 (file)
@@ -1,8 +1,7 @@
 DESCRIPTION = "nEo GPE theme - a very fast, high contrast GPE theme"
-SECTION = "gpe"
 HOMEPAGE = "http://jmccloud.jm.funpic.de"
 AUTHOR = "Jesus McCloud <bernd.pruenster@gmail.com"
-RDEPENDS = "gdk-pixbuf-loader-png gpe-filemanager gpe-sketchbook"
+RDEPENDS = "gpe-filemanager gpe-sketchbook"
 RRECOMMENDS = "elementary-theme-neo e-wm-theme-illume-neo gtk-theme-neo libframeworkd-phonegui-efl-theme-neo etk-theme-neo icon-theme-neo"
 LICENSE = "unknown"
 
@@ -15,6 +14,9 @@ S = "${WORKDIR}/git/gpe/theme-neo/pixmaps"
 
 require gpe-icons.inc
 
+ALTERNATIVE_PRIORITY = 10
+
+#installed to /usr/share/gpe/pixmaps.gpe-theme-neo by default as we don't want to overwrite default icons from gpe-icons package
 do_install() {
         install -d ${D}${datadir}/gpe/
         install -d ${D}${datadir}/gpe/pixmaps.${PN}/
@@ -22,4 +24,3 @@ do_install() {
 }
 
 FILES_${PN} = "${datadir}/gpe/pixmaps.${PN}/"
-