summaryrefslogtreecommitdiffstats
path: root/openembedded/classes
diff options
context:
space:
mode:
authorChris Lord <chris@openedhand.com>2006-07-19 16:12:45 +0000
committerChris Lord <chris@openedhand.com>2006-07-19 16:12:45 +0000
commita74991b103585bfd4451ed6ba58eb6780e8c378f (patch)
tree90d84920458da7110d94fe86134da017b0c36aaa /openembedded/classes
parent5f3d79f3195e24dde7169971343f4db03847a02e (diff)
downloadpoky-a74991b103585bfd4451ed6ba58eb6780e8c378f.tar.gz
- Updates Dates svn package
- Add Dates 0.1 package - Add gtk-icon-cache bbclass to run gtk-update-icon-cache in postinst/postrm - Update gconf class to add gconf to DEPENDS git-svn-id: https://svn.o-hand.com/repos/poky/trunk@513 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes')
-rw-r--r--openembedded/classes/gconf.bbclass2
-rw-r--r--openembedded/classes/gtk-icon-cache.bbclass38
2 files changed, 40 insertions, 0 deletions
diff --git a/openembedded/classes/gconf.bbclass b/openembedded/classes/gconf.bbclass
index b0c5723873..686f8e6596 100644
--- a/openembedded/classes/gconf.bbclass
+++ b/openembedded/classes/gconf.bbclass
@@ -1,3 +1,5 @@
1DEPENDS += "gconf"
2
1gconf_postinst() { 3gconf_postinst() {
2if [ "$1" = configure ]; then 4if [ "$1" = configure ]; then
3 if [ "x$D" != "x" ]; then 5 if [ "x$D" != "x" ]; then
diff --git a/openembedded/classes/gtk-icon-cache.bbclass b/openembedded/classes/gtk-icon-cache.bbclass
new file mode 100644
index 0000000000..0f68e6812b
--- /dev/null
+++ b/openembedded/classes/gtk-icon-cache.bbclass
@@ -0,0 +1,38 @@
1FILES_${PN} += "${datadir}/icons/hicolor"
2
3gtk-icon-cache_postinst() {
4if [ "x$D" != "x" ]; then
5 exit 1
6fi
7gtk-update-icon-cache -q /usr/share/icons/hicolor
8}
9
10gtk-icon-cache_postrm() {
11gtk-update-icon-cache -q /usr/share/icons/hicolor
12}
13
14python populate_packages_append () {
15 import os.path
16 packages = bb.data.getVar('PACKAGES', d, 1).split()
17 workdir = bb.data.getVar('WORKDIR', d, 1)
18
19 for pkg in packages:
20 icon_dir = '%s/install/%s/%s/icons/hicolor' % (workdir, pkg, bb.data.getVar('datadir', d, 1))
21 if not os.path.exists(icon_dir):
22 continue
23
24 bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
25
26 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
27 if not postinst:
28 postinst = '#!/bin/sh\n'
29 postinst += bb.data.getVar('gtk-icon-cache_postinst', d, 1)
30 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
31
32 postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1)
33 if not postrm:
34 postrm = '#!/bin/sh\n'
35 postrm += bb.data.getVar('gtk-icon-cache_postrm', d, 1)
36 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
37}
38