developer | 5968ad5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 1 | DESCRIPTION = "OpenWrt system message/RPC bus" |
| 2 | HOMEPAGE = "http://git.openwrt.org/?p=project/libubox.git;a=summary" |
| 3 | LICENSE = "BSD" |
| 4 | LIC_FILES_CHKSUM = "file://ubusd.c;beginline=1;endline=12;md5=1b6a7aecd35bdd25de35da967668485d" |
| 5 | SECTION = "base" |
| 6 | DEPENDS = "json-c libubox" |
| 7 | |
developer | 54127b7 | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 8 | SRC_URI = "\ |
| 9 | git://git.openwrt.org/project/ubus.git;protocol=https;nobranch=1; \ |
| 10 | file://0001-lua5.3-support.patch \ |
| 11 | " |
developer | 5968ad5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 12 | |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 13 | wifi6_ver = "4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044" |
| 14 | wifi7_ver = "f84eb5998c6ea2d34989ca2d3254e56c66139313" |
| 15 | |
| 16 | SRCREV = "${@bb.utils.contains('DISTRO_FEATURES', 'wifi_eht', '${wifi7_ver}', '${wifi6_ver}', d)}" |
developer | 54127b7 | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 17 | |
| 18 | PV = "git${SRCPV}" |
| 19 | |
| 20 | ABI_VERSION = "1.0" |
developer | 5968ad5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 21 | |
| 22 | S = "${WORKDIR}/git" |
| 23 | |
| 24 | inherit cmake pkgconfig |
| 25 | |
developer | 54127b7 | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 26 | #from class/openwrt-lua |
| 27 | OECMAKE_C_FLAGS += "-DLUA_COMPAT_5_3" |
| 28 | EXTRA_OECMAKE += "-DLUAPATH=${libdir}/lua/5.3" |
| 29 | |
| 30 | FILES_${PN} += "${datadir}/lua/" |
| 31 | FILES_${PN}-dbg += "${libdir}/lua/.debug" |
| 32 | |
| 33 | DEPENDS += "lua" |
| 34 | OECMAKE_C_FLAGS += "-I${STAGING_INCDIR}/lua5.3" |
| 35 | CFLAGS += "-I${STAGING_INCDIR}/lua5.3" |
| 36 | |
| 37 | do_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 | |
| 46 | EXTRA_OECMAKE += "\ |
| 47 | -DCMAKE_INSTALL_LIBDIR:PATH=/lib \ |
| 48 | " |
developer | 5968ad5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 49 | |
| 50 | do_install_append () { |
| 51 | install -dm 0755 ${D}/sbin |
| 52 | ln -s /usr/sbin/ubusd ${D}/sbin/ubusd |
developer | 54127b7 | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 53 | |
| 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} |
developer | 5968ad5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 58 | } |
| 59 | |
developer | 54127b7 | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 60 | PACKAGES =+ "\ |
| 61 | lib${PN}${ABI_VERSION} \ |
| 62 | lib${PN}-lua \ |
| 63 | lib${PN}-examples \ |
| 64 | ${PN}d \ |
| 65 | " |
| 66 | |
| 67 | FILES_SOLIBSDEV = "" |
| 68 | FILES_lib${PN}${ABI_VERSION} += "/lib/libubus.so" |
| 69 | FILES_lib${PN}-lua += "${libdir}/lua/5.3/*" |
| 70 | FILES_lib${PN}-examples += "${bindir}/*.lua" |
| 71 | FILES_${PN}d += "${sbindir} ${base_sbindir}" |