diff options
Diffstat (limited to 'meta/classes/gconf.bbclass')
-rw-r--r-- | meta/classes/gconf.bbclass | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass deleted file mode 100644 index 3e3c509d5f..0000000000 --- a/meta/classes/gconf.bbclass +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | DEPENDS += "gconf" | ||
2 | PACKAGE_WRITE_DEPS += "gconf-native" | ||
3 | |||
4 | # These are for when gconftool is used natively and the prefix isn't necessarily | ||
5 | # the sysroot. TODO: replicate the postinst logic for -native packages going | ||
6 | # into sysroot as they won't be running their own install-time schema | ||
7 | # registration (disabled below) nor the postinst script (as they don't happen). | ||
8 | export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults" | ||
9 | export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2" | ||
10 | |||
11 | # Disable install-time schema registration as we're a packaging system so this | ||
12 | # happens in the postinst script, not at install time. Set both the configure | ||
13 | # script option and the traditional envionment variable just to make sure. | ||
14 | EXTRA_OECONF += "--disable-schemas-install" | ||
15 | export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL = "1" | ||
16 | |||
17 | gconf_postinst() { | ||
18 | if [ "x$D" != "x" ]; then | ||
19 | export GCONF_CONFIG_SOURCE="xml::$D${sysconfdir}/gconf/gconf.xml.defaults" | ||
20 | else | ||
21 | export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` | ||
22 | fi | ||
23 | |||
24 | SCHEMA_LOCATION=$D/etc/gconf/schemas | ||
25 | for SCHEMA in ${SCHEMA_FILES}; do | ||
26 | if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then | ||
27 | HOME=$D/root gconftool-2 \ | ||
28 | --makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null | ||
29 | fi | ||
30 | done | ||
31 | } | ||
32 | |||
33 | gconf_prerm() { | ||
34 | SCHEMA_LOCATION=/etc/gconf/schemas | ||
35 | for SCHEMA in ${SCHEMA_FILES}; do | ||
36 | if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then | ||
37 | HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ | ||
38 | gconftool-2 \ | ||
39 | --makefile-uninstall-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null | ||
40 | fi | ||
41 | done | ||
42 | } | ||
43 | |||
44 | python populate_packages_append () { | ||
45 | import re | ||
46 | packages = d.getVar('PACKAGES').split() | ||
47 | pkgdest = d.getVar('PKGDEST') | ||
48 | |||
49 | for pkg in packages: | ||
50 | schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg) | ||
51 | schemas = [] | ||
52 | schema_re = re.compile(r".*\.schemas$") | ||
53 | if os.path.exists(schema_dir): | ||
54 | for f in os.listdir(schema_dir): | ||
55 | if schema_re.match(f): | ||
56 | schemas.append(f) | ||
57 | if schemas != []: | ||
58 | bb.note("adding gconf postinst and prerm scripts to %s" % pkg) | ||
59 | d.setVar('SCHEMA_FILES', " ".join(schemas)) | ||
60 | postinst = d.getVar('pkg_postinst_%s' % pkg) | ||
61 | if not postinst: | ||
62 | postinst = '#!/bin/sh\n' | ||
63 | postinst += d.getVar('gconf_postinst') | ||
64 | d.setVar('pkg_postinst_%s' % pkg, postinst) | ||
65 | prerm = d.getVar('pkg_prerm_%s' % pkg) | ||
66 | if not prerm: | ||
67 | prerm = '#!/bin/sh\n' | ||
68 | prerm += d.getVar('gconf_prerm') | ||
69 | d.setVar('pkg_prerm_%s' % pkg, prerm) | ||
70 | d.appendVar("RDEPENDS_%s" % pkg, ' ' + d.getVar('MLPREFIX', False) + 'gconf') | ||
71 | } | ||