blob: a8190b7b89abdb2852f536feecbe94dae7226f5e [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001PACKAGE_WRITE_DEPS += "qemu-native"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002inherit qemu
3
4GIO_MODULE_PACKAGES ??= "${PN}"
5
6gio_module_cache_common() {
7if [ "x$D" != "x" ]; then
8 $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
9 mlprefix=${MLPREFIX} \
10 binprefix=${MLPREFIX} \
11 libdir=${libdir} \
12 base_libdir=${base_libdir} \
13 bindir=${bindir}
14else
15 ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
16fi
17}
18
19python populate_packages_append () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020 packages = d.getVar('GIO_MODULE_PACKAGES').split()
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050021
22 for pkg in packages:
23 bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
24
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025 postinst = d.getVar('pkg_postinst_%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050026 if not postinst:
27 postinst = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028 postinst += d.getVar('gio_module_cache_common')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029 d.setVar('pkg_postinst_%s' % pkg, postinst)
30
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031 postrm = d.getVar('pkg_postrm_%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050032 if not postrm:
33 postrm = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034 postrm += d.getVar('gio_module_cache_common')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050035 d.setVar('pkg_postrm_%s' % pkg, postrm)
36}
37