1 FILES_${PN} += "${datadir}/icons/hicolor"
2 RDEPENDS += " hicolor-icon-theme "
4 gtk-icon-cache_postinst() {
5 if [ "x$D" != "x" ]; then
8 gtk-update-icon-cache -q /usr/share/icons/hicolor
11 gtk-icon-cache_postrm() {
12 gtk-update-icon-cache -q /usr/share/icons/hicolor
15 python populate_packages_append () {
17 packages = bb.data.getVar('PACKAGES', d, 1).split()
18 workdir = bb.data.getVar('WORKDIR', d, 1)
21 icon_dir = '%s/install/%s/%s/icons/hicolor' % (workdir, pkg, bb.data.getVar('datadir', d, 1))
22 if not os.path.exists(icon_dir):
25 bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
27 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
29 postinst = '#!/bin/sh\n'
30 postinst += bb.data.getVar('gtk-icon-cache_postinst', d, 1)
31 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
33 postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1)
35 postrm = '#!/bin/sh\n'
36 postrm += bb.data.getVar('gtk-icon-cache_postrm', d, 1)
37 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)