blob: d163b4ef06a79663e6519a4ead07526c8e44c344 [file] [log] [blame]
developer5968ad52022-06-27 19:47:13 +08001DESCRIPTION = "OpenWrt system message/RPC bus"
2HOMEPAGE = "http://git.openwrt.org/?p=project/libubox.git;a=summary"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://ubusd.c;beginline=1;endline=12;md5=1b6a7aecd35bdd25de35da967668485d"
5SECTION = "base"
6DEPENDS = "json-c libubox"
7
developer54127b72022-07-25 13:16:11 +08008SRC_URI = "\
9 git://git.openwrt.org/project/ubus.git;protocol=https;nobranch=1; \
10 file://0001-lua5.3-support.patch \
11 "
developer5968ad52022-06-27 19:47:13 +080012
developer1a173672023-12-21 14:49:33 +080013wifi6_ver = "4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044"
14wifi7_ver = "f84eb5998c6ea2d34989ca2d3254e56c66139313"
15
16SRCREV = "${@bb.utils.contains('DISTRO_FEATURES', 'wifi_eht', '${wifi7_ver}', '${wifi6_ver}', d)}"
developer54127b72022-07-25 13:16:11 +080017
18PV = "git${SRCPV}"
19
20ABI_VERSION = "1.0"
developer5968ad52022-06-27 19:47:13 +080021
22S = "${WORKDIR}/git"
23
24inherit cmake pkgconfig
25
developer54127b72022-07-25 13:16:11 +080026#from class/openwrt-lua
27OECMAKE_C_FLAGS += "-DLUA_COMPAT_5_3"
28EXTRA_OECMAKE += "-DLUAPATH=${libdir}/lua/5.3"
29
30FILES_${PN} += "${datadir}/lua/"
31FILES_${PN}-dbg += "${libdir}/lua/.debug"
32
33DEPENDS += "lua"
34OECMAKE_C_FLAGS += "-I${STAGING_INCDIR}/lua5.3"
35CFLAGS += "-I${STAGING_INCDIR}/lua5.3"
36
37do_configure_prepend () {
38 if [ -e "${S}/CMakeLists.txt" ] ; then
39 sed -i -e \
40 "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
41 -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
42 ${S}/CMakeLists.txt
43 fi
44}
45
46EXTRA_OECMAKE += "\
47 -DCMAKE_INSTALL_LIBDIR:PATH=/lib \
48 "
developer5968ad52022-06-27 19:47:13 +080049
50do_install_append () {
51 install -dm 0755 ${D}/sbin
52 ln -s /usr/sbin/ubusd ${D}/sbin/ubusd
developer54127b72022-07-25 13:16:11 +080053
54 install -m 0755 ${S}/lua/publisher.lua ${D}${bindir}
55 install -m 0755 ${S}/lua/subscriber.lua ${D}${bindir}
56 install -m 0755 ${S}/lua/test_client.lua ${D}${bindir}
57 install -m 0755 ${S}/lua/test.lua ${D}${bindir}
developer5968ad52022-06-27 19:47:13 +080058}
59
developer54127b72022-07-25 13:16:11 +080060PACKAGES =+ "\
61 lib${PN}${ABI_VERSION} \
62 lib${PN}-lua \
63 lib${PN}-examples \
64 ${PN}d \
65 "
66
67FILES_SOLIBSDEV = ""
68FILES_lib${PN}${ABI_VERSION} += "/lib/libubus.so"
69FILES_lib${PN}-lua += "${libdir}/lua/5.3/*"
70FILES_lib${PN}-examples += "${bindir}/*.lua"
71FILES_${PN}d += "${sbindir} ${base_sbindir}"