From 2df4f2cfe72f40fb92c696674f2b3118ae386fab Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 7 Jan 2010 13:08:25 +0100 Subject: gpe-theme-neo: add recipe from shr/merge * gpe-icons.inc: for switching gpe icon theme with u-a and merging installed alternatives of together * standard gpe-icons recipe with require gpe-icons.inc will follow later. I need to prepare some switch for distro to choose if u-a should be used for gpe-icons. --- recipes/gpe-icons/gpe-icons.inc | 36 ++++++++++++++++++++++++++++++++++ recipes/gpe-icons/gpe-theme-neo_git.bb | 25 +++++++++++++++++++++++ 2 files changed, 61 insertions(+) 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 0000000000..0c23814b41 --- /dev/null +++ b/recipes/gpe-icons/gpe-icons.inc @@ -0,0 +1,36 @@ +SECTION = "gpe" +RDEPENDS += "gdk-pixbuf-loader-png" + +inherit update-alternatives + +INC_PR = "r3" + +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 + pixmap_dirs_root="${datadir}/gpe/" + cd ${pixmap_dirs_root} + for pixmap_dir in pixmaps.*; do + if [ "${pixmap_dir}"x == "pixmaps.${PN}"x ] ; then + continue; + fi + for pixmap in `find ${pixmap_dir}`; do + pixmap_target=`echo ${pixmap} | sed "s/${pixmap_dir}/pixmaps.${PN}/g"`; + if [ ! -e ${pixmap_target} ] ; then + cp -ra ${pixmap} ${pixmap_target}; + echo "${pixmap} merged"; + fi; + done + done +} 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 0000000000..192c8a7d8e --- /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