blob: 957517c598e3946db10a266cb515b837a4cd5b5b [file] [log] [blame]
developer2bf53a92022-06-06 12:08:58 +08001FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI += "\
4file://enabling_dhcp_lease_resync.patch;apply=no \
5file://meshagent-enable-ovs-default.patch;apply=no \
6"
7
8DEPENDS_append_dunfell = " safec trower-base64"
9RDEPENDS_${PN}_append_dunfell = " bash"
10
11# we need to patch to code for mesh-agent
12do_turris_meshagent_patches() {
13 cd ${S}
14 if [ ! -e patch_applied ]; then
15 bbnote "Patching enabling_dhcp_lease_resync.patch"
16 patch -p1 < ${WORKDIR}/enabling_dhcp_lease_resync.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
17
18 bbnote "Patching meshagent-enable-ovs-default.patch"
19 patch -p1 < ${WORKDIR}/meshagent-enable-ovs-default.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
20
21 touch patch_applied
22 fi
23}
24addtask turris_meshagent_patches after do_unpack before do_configure
25
26do_install_append () {
27 install -D -m 0644 ${S}/systemd_units/meshAgent.service ${D}${systemd_unitdir}/system/meshAgent.service
28}
29
30FILES_${PN}_append = "${systemd_unitdir}/system/meshAgent.service"
31
32CFLAGS_append = " -D_PLATFORM_TURRIS_"
33
34LDFLAGS_append_dunfell = " -lsyscfg -lsysevent -lbreakpadwrapper -lsafec-3.5.1"
35
36LDFLAGS_remove_dunfell = "-lsafec-3.5"