blob: 92cae5f6c4e59c38920246d6ed33c17952e6ecd8 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001DESCRIPTION = "zxic_ipv6_slaac"
2#zxic_ipv6_slaac依赖libnvram库
3DEPENDS = "libnvram libsoftap libsofttimer"
4SECTION = "app"
5LICENSE = "zte"
6PV = "1.0.0"
7PR = "r0"
8
9CLASS_COM = " \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
11 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
12"
13inherit ${CLASS_COM}
14
15#配置code路径信息。
xf.libdd93d52023-05-12 07:10:14 -070016FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:"
lh9ed821d2023-04-07 01:36:19 -070017SRC_URI = " \
18 file://zxic_ipv6_slaac \
19 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://zxic_ipv6_slaac.init","", d)} \
20 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://zxic_ipv6_slaac.service","", d)} \
21 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://zxic_ipv6_slaac.sysvinit","", d)} \
22 "
23
24LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
25S = "${WORKDIR}"
26
27#引用公用头文件和编译选项。
28include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
29
30#编译
31do_compile() {
32 make -C zxic_ipv6_slaac
33}
34
35#库文件的安装,封库的宏MK_SDK_VERSION
36do_install () {
37 install -d ${D}${bindir}/
38 install -m 0755 ${S}/zxic_ipv6_slaac/zxic_ipv6_slaac ${D}${bindir}/
39
40 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
41 install -Dm 0755 ${WORKDIR}/zxic_ipv6_slaac.init ${D}${sysconfdir}/init.d/zxic_ipv6_slaac
42 fi
43
44 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
45 install -d ${D}${systemd_unitdir}/system
46 install -m 0644 ${WORKDIR}/zxic_ipv6_slaac.service ${D}${systemd_unitdir}/system
47 fi
48
49 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
50 install -Dm 0755 ${WORKDIR}/zxic_ipv6_slaac.sysvinit ${D}${sysconfdir}/init.d/zxic_ipv6_slaac
51 install -d ${D}${sysconfdir}/rcS.d
52 fi
53
54 #install elfs
55 install -d ${ELFS-PATH}/
56 install -m 0755 ${S}/zxic_ipv6_slaac/zxic_ipv6_slaac ${ELFS-PATH}/
57}
58#清库
59do_cleanlibs () {
60 rm -fr ${ELFS-PATH}/zxic_ipv6_slaac
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}/init.d/zxic_ipv6_slaac","", d)} \
69 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
70 "
71SYSTEMD_SERVICE_${PN} = "zxic_ipv6_slaac.service"
72SYSTEMD_AUTO_ENABLE_${PN} = "disable"
73
74RDEPENDS_${PN} = " libnvram libsoftap libsofttimer"