ImageBuilder build hierarchy layout (pkg-config)

I am trying to create a package for gobject-introspection which consist of two parts:

  1. one part used at build time
  2. one part used at runtime

How-ever I am puzzled with the correct install location of the files whether they are supposed to be installed at staging_dir/host or staging_dir/target-xxx .

By reading documentation I try to understand the structure and layout, please correct me if I am wrong;

  • Package/gobject-introspection/install will install files staging_dir/target-xxx this are files to be included in the package as well. This will be the typelib, libgirepository andlibffi files. These are the Runtime files.

Targets for Build time leaves me confused:

  • Build/InstallDev will install development (header) files in staging_dir/target-xxx .
  • Host/Install will install files in staging_dir/host .

Are g-ir-scanner and g-ir-compiler to be installed in staging_dir/host or staging_dir/target-xxx, suggestions?

A Makefile called share/gobject-introspection-1.0/Makefile.introspection is requires by packages like pango, which uses pkg-config to find such files e.g.:

INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection

How-ever during the autoreconf phase the PKG_CONFIG_PATH does not include staging_dir/host/lib/pkgconfig, thus the file cannot be found.

Since the pkg-config files in staging_dir/target-xxx are prefixed relative to the root of staging_dir/target-xxx ,unlike those in the staging_dir/host directory, installing the Makefile in staging_dir/target-xxx and using the corresponding *.pc file will cause the path not to be found.

Leaves me puzzled how-to deal with with the particularpkg-config calls in the makefile, suggestions?