blob: 7656be896d0eef8e3586984ac50b3e7685c6194e [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001DESCRIPTION = "wlan_proxy"
2DEPENDS = "libsoftap libsofttimer libnvram libatutils libscipc libsctel"
3SECTION = "app"
4LICENSE = "zte"
5PV = "1.0.0"
6PR = "r0"
7
8CLASS_COM = " \
9 ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
11"
12inherit ${CLASS_COM}
13
14#配置code路径信息。
15FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:"
16SRC_URI = " \
17 file://wlan_proxy \
18 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://wlan_proxy.init","", d)} \
19 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://wlan_proxy.service","", d)} \
20 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://wlan_proxy.sysvinit","", d)} \
21 "
22
23LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
24S = "${WORKDIR}"
25
26#引用公用头文件和编译选项。
27include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
28
29#编译
30do_compile() {
31 make -C wlan_proxy
32}
33
34#库文件的安装
35do_install() {
36 install -d ${D}${bindir}/
37 install -m 0755 ${S}/wlan_proxy/wlan_proxy ${D}${bindir}/
38
39 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
40 install -Dm 0755 ${WORKDIR}/wlan_proxy.init ${D}${sysconfdir}/init.d/wlan_proxy
41 fi
42
43 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
44 install -d ${D}${systemd_unitdir}/system
45 install -m 0644 ${WORKDIR}/wlan_proxy.service ${D}${systemd_unitdir}/system
46 fi
47
48 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
49 install -Dm 0755 ${WORKDIR}/wlan_proxy.sysvinit ${D}${sysconfdir}/init.d/wlan_proxy
50 install -d ${D}${sysconfdir}/rcS.d
51 ln -s ../init.d/wlan_proxy ${D}${sysconfdir}/rcS.d/S18wlan_proxy
52 fi
53
54 #install elfs
55 install -d ${ELFS-PATH}/
56 install -m 0755 ${S}/wlan_proxy/wlan_proxy ${ELFS-PATH}/
57}
58#清库
59do_cleanlibs () {
60 rm -fr ${ELFS-PATH}/wlan_proxy
61}
62
63addtask cleanlibs after do_clean before do_cleansstate
64
65#rootfs包含的文件
66FILES_${PN} = "\
67 ${bindir}/ \
68 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/","", d)} \
69 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
70 "
71SYSTEMD_SERVICE_${PN} = "wlan_proxy.service"
72SYSTEMD_AUTO_ENABLE_${PN} = "enable"
73
74RDEPENDS_${PN} = " libsoftap libsofttimer libnvram libatutils libscipc libsctel"