* What's wrong:
* Applications can install own icons before link for alternatives is
  created
* Icons installed with application are lost when we change link with
  update-alternatives
* Needs to by sychronized after switching link
* Or use update-alternatives on all icons inside (not whole directory):/
---
 recipes/gpe-icons/gpe-icons.inc        |   20 ++++++++++++++++++++
 recipes/gpe-icons/gpe-icons_0.25.bb    |    7 ++++++-
 recipes/gpe-icons/gpe-theme-neo_git.bb |   25 +++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletions(-)
 create mode 100644 recipes/gpe-icons/gpe-icons.inc
 create mode 100644 recipes/gpe-icons/gpe-theme-neo_git.bb

diff --git a/recipes/gpe-icons/gpe-icons.inc b/recipes/gpe-icons/gpe-icons.inc
new file mode 100644
index 0000000..5e52894
--- /dev/null
+++ b/recipes/gpe-icons/gpe-icons.inc
@@ -0,0 +1,20 @@
+SECTION = "gpe"
+RDEPENDS += "gdk-pixbuf-loader-png"
+
+inherit update-alternatives
+
+ALTERNATIVE_NAME = "gpe-pixmaps"
+ALTERNATIVE_LINK = "${datadir}/gpe/pixmaps"
+ALTERNATIVE_PATH = "${datadir}/gpe/pixmaps.${PN}"
+ALTERNATIVE_PRIORITY ?= 1
+
+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
+}
diff --git a/recipes/gpe-icons/gpe-icons_0.25.bb 
b/recipes/gpe-icons/gpe-icons_0.25.bb
index 6276e95..42742d4 100644
--- a/recipes/gpe-icons/gpe-icons_0.25.bb
+++ b/recipes/gpe-icons/gpe-icons_0.25.bb
@@ -7,9 +7,14 @@ RDEPENDS = "gdk-pixbuf-loader-png"
 
 inherit gpe
 
-PR = "r1"
+PR = "r2"
 
 #only icons present in the package
 PACKAGE_ARCH = "all"
 FILES_${PN} = "${datadir}/gpe"
 
+do_configure_prepend() {
+        sed -i "s| \$(DESTDIR)\$(PREFIX)/share/gpe/pixmaps/| 
\$(DESTDIR)\$(PREFIX)/share/gpe/pixmaps.${PN}/|g" Makefile
+}
+
+require gpe-icons.inc
diff --git a/recipes/gpe-icons/gpe-theme-neo_git.bb 
b/recipes/gpe-icons/gpe-theme-neo_git.bb
new file mode 100644
index 0000000..54ab120
--- /dev/null
+++ b/recipes/gpe-icons/gpe-theme-neo_git.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "nEo GPE theme - a very fast, high contrast GPE theme"
+SECTION = "gpe"
+HOMEPAGE = "http://jmccloud.jm.funpic.de";
+AUTHOR = "Jesus McCloud <[email protected]"
+RDEPENDS = "gdk-pixbuf-loader-png 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"
+
+PV = "0.2-${EFL_SRCREV}+gitr${SRCPV}"
+PR = "r2"
+
+SRC_URI = 
"git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
+
+S = "${WORKDIR}/git/gpe/theme-neo/pixmaps"
+
+require gpe-icons.inc
+
+do_install() {
+        install -d ${D}${datadir}/gpe/
+        install -d ${D}${datadir}/gpe/pixmaps.${PN}/
+        cp -r ${S}/* "${D}${datadir}/gpe/pixmaps.${PN}/"
+}
+
+FILES_${PN} = "${datadir}/gpe/pixmaps.${PN}/"
+
-- 
1.6.5.3

_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to