Jackie Huang | e0634c6 | 2022-05-05 19:49:22 +0800 | [diff] [blame^] | 1 | require metal-common.inc |
| 2 | |
| 3 | SUBPATH0 = "inventory/inventory/" |
| 4 | |
| 5 | LICENSE = "Apache-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" |
| 7 | |
| 8 | SRC_URI += "file://0001-inventory-Remove-argparse-requirement.patch" |
| 9 | |
| 10 | RDEPENDS_${PN} += " \ |
| 11 | bash \ |
| 12 | python-anyjson \ |
| 13 | python-amqplib \ |
| 14 | python-pyudev \ |
| 15 | python-pyparted \ |
| 16 | python-ipaddr \ |
| 17 | python-paste \ |
| 18 | python-eventlet \ |
| 19 | python-futurist \ |
| 20 | python-jsonpatch \ |
| 21 | python-keystoneauth1 \ |
| 22 | python-keystonemiddleware \ |
| 23 | python-neutronclient \ |
| 24 | python-oslo.concurrency \ |
| 25 | python-oslo.config \ |
| 26 | python-oslo.context \ |
| 27 | python-oslo.db \ |
| 28 | python-oslo.i18n \ |
| 29 | python-oslo.log \ |
| 30 | python-oslo.messaging \ |
| 31 | python-oslo.middleware \ |
| 32 | python-oslo.policy \ |
| 33 | python-oslo.rootwrap \ |
| 34 | python-oslo.serialization \ |
| 35 | python-oslo.service \ |
| 36 | python-oslo.utils \ |
| 37 | python-oslo.versionedobjects \ |
| 38 | python-osprofiler \ |
| 39 | python-pbr \ |
| 40 | python-pecan \ |
| 41 | python-psutil \ |
| 42 | python-requests \ |
| 43 | python-retrying \ |
| 44 | python-six \ |
| 45 | python-sqlalchemy \ |
| 46 | python-stevedore \ |
| 47 | python-webob \ |
| 48 | python-wsme \ |
| 49 | " |
| 50 | |
| 51 | DEPENDS += " \ |
| 52 | python-pbr-native \ |
| 53 | " |
| 54 | |
| 55 | inherit systemd |
| 56 | SYSTEMD_PACKAGES = "${PN}" |
| 57 | SYSTEMD_SERVICE_${PN} = "inventory-api.service inventory-conductor.service" |
| 58 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" |
| 59 | |
| 60 | inherit setuptools python-dir |
| 61 | |
| 62 | |
| 63 | do_install_append () { |
| 64 | |
| 65 | install -d -m 755 ${D}/${sysconfdir}/goenabled.d |
| 66 | install -p -D -m 755 etc/inventory/inventory_goenabled_check.sh ${D}/${sysconfdir}/goenabled.d/inventory_goenabled_check.sh |
| 67 | |
| 68 | install -d -m 755 ${D}/${sysconfdir}/inventory |
| 69 | install -p -D -m 755 etc/inventory/policy.json ${D}/${sysconfdir}/inventory/policy.json |
| 70 | |
| 71 | install -d -m 755 ${D}/${sysconfdir}/motd.d |
| 72 | install -p -D -m 755 etc/inventory/motd-system ${D}/${sysconfdir}/motd.d/10-system-config |
| 73 | |
| 74 | install -m 755 -p -D scripts/inventory-api ${D}/${libdir}/ocf/resource.d/platform/inventory-api |
| 75 | install -m 755 -p -D scripts/inventory-conductor ${D}/${libdir}/ocf/resource.d/platform/inventory-conductor |
| 76 | |
| 77 | install -d -m 0755 ${D}/${systemd_system_unitdir}/ |
| 78 | install -m 644 -p -D scripts/inventory-api.service ${D}/${systemd_system_unitdir}/ |
| 79 | install -m 644 -p -D scripts/inventory-conductor.service ${D}/${systemd_system_unitdir}/ |
| 80 | |
| 81 | # Install sql migration |
| 82 | install -m 644 inventory/db/sqlalchemy/migrate_repo/migrate.cfg \ |
| 83 | ${D}/${PYTHON_SITEPACKAGES_DIR}/inventory/db/sqlalchemy/migrate_repo/migrate.cfg |
| 84 | |
| 85 | } |
| 86 | |
| 87 | FILES_${PN}_append = " \ |
| 88 | ${libdir}/ocf/resource.d/platform/inventory-api \ |
| 89 | ${libdir}/ocf/resource.d/platform/inventory-conductor \ |
| 90 | " |