Lakshminarayana R. Kammath | 706fff9 | 2020-03-07 10:14:07 -0600 | [diff] [blame^] | 1 | SUMMARY = "eCMD" |
| 2 | DESCRIPTION = "eCMD is a hardware access API for POWER Systems" |
| 3 | LICENSE= "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${S}/NOTICE;md5=fee220301a2af3faf8f211524b4248ea" |
| 5 | |
| 6 | SRC_URI = "git://github.com/open-power/eCMD.git;branch=ecmd15;protocol=git" |
| 7 | SRCREV = "15e382180d49f7ea4117ccc341ca91e361721fd4" |
| 8 | |
| 9 | inherit python3native |
| 10 | DEPENDS = "zlib" |
| 11 | |
| 12 | S = "${WORKDIR}/git" |
| 13 | |
| 14 | export LD="${CXX}" |
| 15 | export SLDFLAGS="${LDFLAGS}" |
| 16 | |
| 17 | # use native config.py to build required ecmd extensions |
| 18 | do_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 | |
| 24 | do_compile() { |
| 25 | oe_runmake all |
| 26 | } |
| 27 | |
| 28 | do_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. |
| 51 | PARALLEL_MAKE = "" |
| 52 | |
| 53 | # ecmd doesn't have proper library versioning |
| 54 | FILES_${PN}-dev_remove = "${libdir}/lib*.so" |
| 55 | FILES_${PN} += "${libdir}/lib*.so" |
| 56 | |
| 57 | RDEPENDS_${PN}-bin = "libecmd" |
| 58 | |
| 59 | # This allows someone to easily use ecmd bins, even if you don’t want them. |
| 60 | PACKAGE_BEFORE_PN = "libecmd-bin" |
| 61 | FILES_${PN}-bin += "${bindir}" |