blob: 5edafb7c68729eb452491b034931e9663e08a908 [file] [log] [blame]
developerbc262d52022-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
developere93d6ea2022-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 "
developerbc262d52022-06-27 19:47:13 +080012
developer78d54bf2022-07-04 10:06:58 +080013SRCREV = "2bebf93cd3343fe49f22a05ef935e460d2d44f67"
developere93d6ea2022-07-25 13:16:11 +080014
15PV = "git${SRCPV}"
16
17ABI_VERSION = "1.0"
developerbc262d52022-06-27 19:47:13 +080018
19S = "${WORKDIR}/git"
20
21inherit cmake pkgconfig
22
developere93d6ea2022-07-25 13:16:11 +080023#from class/openwrt-lua
24OECMAKE_C_FLAGS += "-DLUA_COMPAT_5_3"
25EXTRA_OECMAKE += "-DLUAPATH=${libdir}/lua/5.3"
26
27FILES_${PN} += "${datadir}/lua/"
28FILES_${PN}-dbg += "${libdir}/lua/.debug"
29
30DEPENDS += "lua"
31OECMAKE_C_FLAGS += "-I${STAGING_INCDIR}/lua5.3"
32CFLAGS += "-I${STAGING_INCDIR}/lua5.3"
33
34do_configure_prepend () {
35 if [ -e "${S}/CMakeLists.txt" ] ; then
36 sed -i -e \
37 "s:ARCHIVE DESTINATION lib:ARCHIVE DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
38 -e "s:LIBRARY DESTINATION lib:LIBRARY DESTINATION \${CMAKE_INSTALL_LIBDIR}:g" \
39 ${S}/CMakeLists.txt
40 fi
41}
42
43EXTRA_OECMAKE += "\
44 -DCMAKE_INSTALL_LIBDIR:PATH=/lib \
45 "
developerbc262d52022-06-27 19:47:13 +080046
47do_install_append () {
48 install -dm 0755 ${D}/sbin
49 ln -s /usr/sbin/ubusd ${D}/sbin/ubusd
developere93d6ea2022-07-25 13:16:11 +080050
51 install -m 0755 ${S}/lua/publisher.lua ${D}${bindir}
52 install -m 0755 ${S}/lua/subscriber.lua ${D}${bindir}
53 install -m 0755 ${S}/lua/test_client.lua ${D}${bindir}
54 install -m 0755 ${S}/lua/test.lua ${D}${bindir}
developerbc262d52022-06-27 19:47:13 +080055}
56
developere93d6ea2022-07-25 13:16:11 +080057PACKAGES =+ "\
58 lib${PN}${ABI_VERSION} \
59 lib${PN}-lua \
60 lib${PN}-examples \
61 ${PN}d \
62 "
63
64FILES_SOLIBSDEV = ""
65FILES_lib${PN}${ABI_VERSION} += "/lib/libubus.so"
66FILES_lib${PN}-lua += "${libdir}/lua/5.3/*"
67FILES_lib${PN}-examples += "${bindir}/*.lua"
68FILES_${PN}d += "${sbindir} ${base_sbindir}"