blob: 767dd86980b194bbe8d3c43fdbe76db5ed1125c2 [file] [log] [blame]
developer15a43312022-04-12 11:23:23 +08001require ccsp_common_turris.inc
2
3export PLATFORM_TURRIS_ENABLED="yes"
4
5inherit systemd
6
7DEPENDS_remove_dunfell = "hal-gwprovappabs"
8DEPENDS_append_dunfell = " breakpad-wrapper rdk-logger utopia"
9
10LDFLAGS_remove_dunfell = "-lgwprovappabs"
11
12CFLAGS_append = " -Wno-unused-variable -Wno-sizeof-pointer-memaccess -Wno-unused-parameter -Wno-unused-but-set-variable "
13
14do_install_append () {
15 install -d ${D}${systemd_unitdir}/system
16 install -m 0644 ${S}/service/gwprovethwan.service ${D}${systemd_unitdir}/system
17 sed -i "s/After=rg_network.service/After=network.target/g" ${D}${systemd_unitdir}/system/gwprovethwan.service
18 sed -i "/After=network.target/a wants=network.target" ${D}${systemd_unitdir}/system/gwprovethwan.service
19 sed -e '/Type/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service
20 sed -e '/ExecStartPre/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service
21 sed -i "/utopia_init.sh/a ExecStartPre=-/bin/sh -c 'mkdir -p /rdklogs/logs/'" ${D}${systemd_unitdir}/system/gwprovethwan.service
22 sed -e '/ExecStartPost/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service
23 sed -i "/bin\/rm/a Restart=always" ${D}${systemd_unitdir}/system/gwprovethwan.service
24 sed -i "s/StandardOutput=syslog/StandardOutput=syslog+console/g" ${D}${systemd_unitdir}/system/gwprovethwan.service
25 sed -i "s/wants=/Wants=/" ${D}${systemd_unitdir}/system/gwprovethwan.service
26}
27
28SYSTEMD_SERVICE_${PN} = "gwprovethwan.service"
29FILES_${PN} += " \
30 ${systemd_unitdir}/system/gwprovethwan.service \
31"