diff options
author | Graeme Gregory <dp@xora.org.uk> | 2010-01-10 21:07:57 +0000 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2010-01-10 21:07:57 +0000 |
commit | 09be6bb208f5ecc2a00274038866f5fb3b25c5fd (patch) | |
tree | 85c28fadcdfd4172a9959486369fdd55a2fef130 /recipes/gpe-icons/gpe-icons.inc | |
parent | 8a3b0c0dd65c3c2def554af01446b9ee09725355 (diff) | |
parent | f2934215635d101459eb15b3505843370c20c6ec (diff) |
Merge branch 'org.openembedded.dev' of git+ssh://git.openembedded.org/openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/gpe-icons/gpe-icons.inc')
-rw-r--r-- | recipes/gpe-icons/gpe-icons.inc | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes/gpe-icons/gpe-icons.inc b/recipes/gpe-icons/gpe-icons.inc new file mode 100644 index 0000000000..18dd39bd04 --- /dev/null +++ b/recipes/gpe-icons/gpe-icons.inc @@ -0,0 +1,38 @@ +SECTION = "gpe" +RDEPENDS += "gdk-pixbuf-loader-png" + +INHERIT = "gpe" +INHERIT_shr = "gpe update-alternatives" +inherit ${INHERIT} + +INC_PR = "r4" + +ALTERNATIVE_NAME = "gpe-pixmaps" +ALTERNATIVE_LINK = "${datadir}/gpe/pixmaps" +ALTERNATIVE_PATH = "${datadir}/gpe/pixmaps.${PN}" +ALTERNATIVE_PRIORITY ?= 1 + +pkg_postinst_shr() { + 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 +} |