summaryrefslogtreecommitdiff
path: root/mtsazure_git.bb
blob: 17a203385aa839b01c5a2d472321b1786c707d92 (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
33
34
35
36
37
DESCRIPTION = "MTS Azure SDK libraries and communications app"
HOMEPAGE = "http://www.multitech.com/"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
DEPENDS = "curl util-linux"
BBCLASSEXTEND = "native"
PR = "r0"
SRCREV = "0911077926483415a8b430b4a4e3202b336570a9"
SRC_URI = " \
	git://git@gitlab.multitech.net/multitech-apps/mtsazure.git;protocol=ssh;branch=master \
"
TARGET_CC_ARCH += "${LDFLAGS}"

inherit cmake

INITSCRIPT_NAME = "mtsazure"
INITSCRIPT_PARAMS = "defaults 75 70"

S = "${WORKDIR}/git"

do_compile() {
	bash -c "if [[ -d "../git/azure-iot-sdk-c/.git" ]]; then cd ../git/azure-iot-sdk-c; git pull; else rm -rf ../git/azure-iot-sdk-c; git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git ../git/azure-iot-sdk-c; fi"
	sed -i 's/option(build_as_dynamic "build the IoT SDK libaries as dynamic"  OFF)/option(build_as_dynamic "build the IoT SDK libaries as dynamic" ON)/' ../git/azure-iot-sdk-c/CMakeLists.txt
	sed -i 's#SET(CMAKE_FIND_ROOT_PATH \(.*\))#SET(CMAKE_FIND_ROOT_PATH '$(readlink -f $(pwd)/../../../../../sysroots/mtcdt)')#' ../git/toolchain.cmake
	../git/azure-iot-sdk-c/build_all/linux/build.sh --toolchain-file ../git/toolchain.cmake;
	oe_runmake -C ../git
}

do_install() {
	echo "do_install_in_progress D = ${D}"
	oe_runmake -C ../git install DESTDIR=${D}
}

do_rm_work() {
    echo "skipping"
}