blob: 36b13470d77d23a6e45f9f4882fe2bc56e1c5a7a [file] [log] [blame]
Jackie Huange0634c62022-05-05 19:49:22 +08001require ha-common.inc
2SUBPATH0 = "service-mgmt-api/sm-api"
3
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
6
7RDEPENDS_${PN}_append = " \
8 bash \
9 python-six \
10 chkconfig \
11 mtce-pmon \
12 "
13inherit setuptools
14SYSTEMD_PACKAGES += "sm-api"
15SYSTEMD_SERVICE_sm-api = "sm-api.service"
16SYSTEMD_AUTO_ENABLE_sm-api = "enable"
17
18do_install_append () {
19 install -d -m 0755 ${D}/${sysconfdir}/sm
20 install -d -m 0755 ${D}/${sysconfdir}/init.d
21 install -d -m 0755 ${D}/${sysconfdir}/pmon.d
22 install -d -m 0755 ${D}/${sysconfdir}/sm-api
23 install -d -m 0755 ${D}/${systemd_system_unitdir}
24 install -m 644 scripts/sm_api.ini ${D}/${sysconfdir}/sm
25 install -m 755 scripts/sm-api ${D}/${sysconfdir}/init.d
26 install -m 644 scripts/sm-api.service ${D}/${systemd_system_unitdir}
27 install -m 644 scripts/sm-api.conf ${D}/${sysconfdir}/pmon.d
28 install -m 644 etc/sm-api/policy.json ${D}/${sysconfdir}/sm-api
29}