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