summaryrefslogtreecommitdiffstats
path: root/external/meta-iot-cloud/recipes-oisp/oisp-cli/oisp-cli_1.1.0.bb
blob: c9bbd83907d9c241c45aa47f1e9a8cdcb144bc77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DESCRIPTION = "OISP Command Line Interface"
AUTHOR = "Intel"
HOMEPAGE = "https://github.com/Open-IoT-Service-Platform/oisp-cli"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=753cb46fee8d2addab0d40c31b2ff141"

inherit npm

ORGANIZATION = "open-iot-service-platform"

SRC_URI = "\
    npm://registry.npmjs.org;package=@${ORGANIZATION}/${BPN};version=${PV} \
    npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
"

PR = "r0"

S = "${WORKDIR}/npm"

OISP_CONFIG ?= "${S}/config/config.json.template"

do_install_append() {
    # Copy config and create a symlink
    install -d ${D}${sysconfdir}/oisp
    install -m 0644 ${OISP_CONFIG} ${D}/${libdir}/node_modules/@${ORGANIZATION}/${BPN}/config/config.json
    ln -s ${libdir}/node_modules/@${ORGANIZATION}/${BPN}/config/config.json ${D}/${sysconfdir}/oisp/cli.json
}

FILES_${PN} += " \
    ${libdir}/node_modules/@${ORGANIZATION}/${BPN} \
    ${sysconfdir}/oisp \
"