Add inventory manager class
Change-Id: Ib034680499f16efb842bc5074e269bb590f25fbd
diff --git a/classes/phosphor-inventory-manager.bbclass b/classes/phosphor-inventory-manager.bbclass
new file mode 100644
index 0000000..01fa372
--- /dev/null
+++ b/classes/phosphor-inventory-manager.bbclass
@@ -0,0 +1,2 @@
+base_datadir="${datadir}/phosphor-inventory-manager"
+rules_datadir="${base_datadir}/events.d"
diff --git a/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-example-native.bb b/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-example-native.bb
index 880d5ac..e59bc88 100644
--- a/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-example-native.bb
+++ b/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-example-native.bb
@@ -2,6 +2,7 @@
PR = "r1"
inherit native
+inherit phosphor-inventory-manager
require phosphor-inventory-manager.inc
@@ -9,9 +10,9 @@
do_install() {
SRC=${S}/example
- DEST=${D}${datadir}/phosphor-inventory-manager
+ DEST=${D}${base_datadir}
for f in `find $SRC -type f -printf "%P\n"`; do
- install -D ${SRC}/$f $DEST/$f
+ install -D ${SRC}/$f ${DEST}/$f
done
}
diff --git a/common/recipes-phosphor/inventory/phosphor-inventory-manager.bb b/common/recipes-phosphor/inventory/phosphor-inventory-manager.bb
index fda1d53..3d1dacf 100644
--- a/common/recipes-phosphor/inventory/phosphor-inventory-manager.bb
+++ b/common/recipes-phosphor/inventory/phosphor-inventory-manager.bb
@@ -7,6 +7,7 @@
inherit autotools \
pkgconfig \
pythonnative \
+ phosphor-inventory-manager \
obmc-phosphor-dbus-service
require phosphor-inventory-manager.inc
@@ -27,7 +28,7 @@
S = "${WORKDIR}/git"
EXTRA_OECONF = " \
- YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \
+ YAML_PATH=${STAGING_DIR_NATIVE}${base_datadir} \
BUSNAME=${OBMC_INVENTORY_MGR_IFACE} \
INVENTORY_ROOT=${OBMC_INVENTORY_PATH} \
IFACE=${OBMC_INVENTORY_MGR_IFACE} \