blob: dd7c3f42baa3070be4463896e9b4f679d832408b [file] [log] [blame]
Lakshminarayana R. Kammath706fff92020-03-07 10:14:07 -06001SUMMARY = "eCMD"
2DESCRIPTION = "eCMD is a hardware access API for POWER Systems"
3LICENSE= "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${S}/NOTICE;md5=fee220301a2af3faf8f211524b4248ea"
5
Patrick Williamsbb99d222022-01-24 15:55:09 -06006SRC_URI = "git://github.com/open-power/eCMD.git;branch=ecmd15;protocol=https"
Lakshminarayana R. Kammath706fff92020-03-07 10:14:07 -06007SRCREV = "15e382180d49f7ea4117ccc341ca91e361721fd4"
8
9inherit python3native
10DEPENDS = "zlib"
11
12S = "${WORKDIR}/git"
13
14export LD="${CXX}"
15export SLDFLAGS="${LDFLAGS}"
16
17# use native config.py to build required ecmd extensions
18do_configure() {
19 ${S}/config.py --without-swig --without-python --without-python3 --without-perl \
20 --without-pyecmd --install-path ${D}${prefix} --output-root ${B} --target ${TARGET_ARCH} \
21 --extensions "cmd cip"
22}
23
24do_compile() {
25 oe_runmake all
26}
27
28do_install() {
29 oe_runmake install
30
31 # we don't need the target scripts or ecmd setup
32 rm ${D}${bindir}/target.* ${D}${bindir}/ecmdsetup.pl
33
34 # ecmd installs to atypical places in the filesystem.
35 # move all the installed files to more conventional directories.
36 install -d ${D}${includedir} ${D}${datadir}/${BPN}/help ${D}${bindir} ${D}${libdir}
37 mv ${D}${prefix}/help/** ${D}${datadir}/${BPN}/help
38 mv ${D}${prefix}/${TARGET_ARCH}/bin/** ${D}${bindir}
39 mv ${D}${prefix}/${TARGET_ARCH}/lib/** ${D}${libdir}
40
41 rm ${D}${bindir}/ecmdVersion
42
43 rmdir ${D}${prefix}/help \
44 ${D}${prefix}/${TARGET_ARCH}/lib \
45 ${D}${prefix}/${TARGET_ARCH}/bin \
46 ${D}${prefix}/${TARGET_ARCH}/perl \
47 ${D}${prefix}/${TARGET_ARCH}
48}
49
50# ecmd makefile assumes that dependencies are built from left to right.
51PARALLEL_MAKE = ""
52
53# ecmd doesn't have proper library versioning
Adriana Kobylak8c6707f2021-08-06 17:35:36 +000054FILES:${PN}-dev:remove = "${libdir}/lib*.so"
55FILES:${PN} += "${libdir}/lib*.so"
Lakshminarayana R. Kammath706fff92020-03-07 10:14:07 -060056
Adriana Kobylak8c6707f2021-08-06 17:35:36 +000057RDEPENDS:${PN}-bin = "libecmd"
Lakshminarayana R. Kammath706fff92020-03-07 10:14:07 -060058
59# This allows someone to easily use ecmd bins, even if you don’t want them.
60PACKAGE_BEFORE_PN = "libecmd-bin"
Adriana Kobylak8c6707f2021-08-06 17:35:36 +000061FILES:${PN}-bin += "${bindir}"