developer | 2bf53a9 | 2022-06-06 12:08:58 +0800 | [diff] [blame^] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2 | |
| 3 | SRC_URI += "\ |
| 4 | file://enabling_dhcp_lease_resync.patch;apply=no \ |
| 5 | file://meshagent-enable-ovs-default.patch;apply=no \ |
| 6 | " |
| 7 | |
| 8 | DEPENDS_append_dunfell = " safec trower-base64" |
| 9 | RDEPENDS_${PN}_append_dunfell = " bash" |
| 10 | |
| 11 | # we need to patch to code for mesh-agent |
| 12 | do_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 | } |
| 24 | addtask turris_meshagent_patches after do_unpack before do_configure |
| 25 | |
| 26 | do_install_append () { |
| 27 | install -D -m 0644 ${S}/systemd_units/meshAgent.service ${D}${systemd_unitdir}/system/meshAgent.service |
| 28 | } |
| 29 | |
| 30 | FILES_${PN}_append = "${systemd_unitdir}/system/meshAgent.service" |
| 31 | |
| 32 | CFLAGS_append = " -D_PLATFORM_TURRIS_" |
| 33 | |
| 34 | LDFLAGS_append_dunfell = " -lsyscfg -lsysevent -lbreakpadwrapper -lsafec-3.5.1" |
| 35 | |
| 36 | LDFLAGS_remove_dunfell = "-lsafec-3.5" |