summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb
blob: 35e13a6381cee6e9489dd3ab083f1b31dc4d7ad5 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
DESCRIPTION = "LoRa Basic Station"
HOMEPAGE = "https://github.com/lorabasics/basicstation"
PRIORITY = "optional"
SECTION = "console/utils"
# Semtech license is a modified BSD-style license
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=26699ffb0048fefa02c871c2485867ee"
DEPENDS = "lora-gateway-sx1303 logrotate lora-logging mbedtls"
RDEPENDS_${PN} += "bash"
PR = "r4"

# SRCREV = "9bf824154731cbe78366cbffa1b0c6bd0354b66f"
SRCREV = "${PV}"

SRC_URI = "git://github.com/MultiTechSystems/basicstation.git;protocol=https;branch=master; \
           file://setup.gmk \
           file://lora-basic-station.init \
           file://lora-basic-station.default \
           file://tc.uri \
           file://mtcap-station.conf \
           file://mtcdt-station.conf \
"

S = "${WORKDIR}/git"
B = "${S}"

LORA_DIR = "/opt/lora"

export LGW_PATH = "${STAGING_LIBDIR}/lora"
export LGW_INC = "${STAGING_INCDIR}/lora"

CFLAGS += "-DNODEBUG -I${STAGING_INCDIR} -I${WORKDIR}/git/libtools -I${STAGING_INCDIR}/lora -I${STAGING_INCDIR}/lora/lgw-sx1303 -I${WORKDIR}/git/deps -Iinc -I. -std=gnu11 -L${WORKDIR}/git/libtools -L${STAGING_LIBDIR}/lora/lgw-sx1303/lgw/ -L${STAGING_LIBDIR}/lora"

do_compile() {
  cp ${WORKDIR}/setup.gmk ${S}/setup.gmk
  oe_runmake
}

do_install() {
  install -d ${D}${LORA_DIR}
  install -m 755 ${S}/build-mlinux-sx1303/bin/station ${D}${LORA_DIR}/station-sx1303
}

do_install_append_mtcdt() {
  install -d ${D}${LORA_DIR}
  install -m 755 ${WORKDIR}/mtcdt-station.conf ${D}${LORA_DIR}/station-sx1303.conf
}



FILES_${PN} += "${LORA_DIR}"

# disable this on purpose for dev purposes
do_rm_work() {
  echo "skipping"
}