summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
blob: 4c23e1c6c342157056e715656b47bd2527ec6bbe (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
57
58
59
60
61
62
63
DESCRIPTION = "LoRa Packet Forwarder"
HOMEPAGE = "https://github.com/Lora-net/packet_forwarder"
PRIORITY = "optional"
SECTION = "console/utils"
# Semtech license is a modified BSD-style license
LICENSE = "SEMTECH"
LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45"
DEPENDS = "lora-gateway"
PR = "r3"

SRCREV = "v${PV}"

SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \
           file://README.md \
           file://lora-packet-forwarder.init \
           file://lora-packet-forwarder.default \
           file://global_conf.json.3.0.0.PCB_E286.EU868.basic.clksrc0 \
           file://global_conf.json.3.0.0.PCB_E286.EU868.basic.clksrc1 \
           file://local_conf.json \
"

S = "${WORKDIR}/git"

LORA_DIR = "/opt/lora"

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

CFLAGS += "-I${LGW_INC} -Iinc -I."

do_compile() {
	oe_runmake
}

do_install() {
	install -d ${D}${LORA_DIR}
	install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/
# This file may be overwritten with a do_install_append_<MACHINE> function
	install -m 755 ${WORKDIR}/global_conf.json.3.0.0.PCB_E286.EU868.basic.clksrc1 ${D}${LORA_DIR}/global_conf.json
	install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/

    install -d ${D}${sysconfdir}/default
    install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder
    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder

	install -m 755 util_sink/util_sink ${D}${LORA_DIR}/
	install -m 755 util_ack/util_ack ${D}${LORA_DIR}/
	install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/
	install -m 755 ${WORKDIR}/README.md  ${D}${LORA_DIR}/
}

do_install_append_mtp() {
	install -m 755 ${WORKDIR}/global_conf.json.3.0.0.PCB_E286.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json
}

FILES_${PN} += "${LORA_DIR}"
FILES_${PN}-dbg += "${LORA_DIR}/.debug"

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