developer | bc262d5 | 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 | e93d6ea | 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 | bc262d5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 12 | |
developer | 2a20969 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 13 | SRCREV = "f787c97b34894a38b15599886cacbca01271684f" |
developer | e93d6ea | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 14 | |
| 15 | PV = "git${SRCPV}" |
| 16 | |
| 17 | ABI_VERSION = "1.0" |
developer | bc262d5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
| 21 | inherit cmake pkgconfig |
| 22 | |
developer | e93d6ea | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 23 | #from class/openwrt-lua |
| 24 | OECMAKE_C_FLAGS += "-DLUA_COMPAT_5_3" |
| 25 | EXTRA_OECMAKE += "-DLUAPATH=${libdir}/lua/5.3" |
| 26 | |
| 27 | FILES_${PN} += "${datadir}/lua/" |
| 28 | FILES_${PN}-dbg += "${libdir}/lua/.debug" |
| 29 | |
| 30 | DEPENDS += "lua" |
| 31 | OECMAKE_C_FLAGS += "-I${STAGING_INCDIR}/lua5.3" |
| 32 | CFLAGS += "-I${STAGING_INCDIR}/lua5.3" |
| 33 | |
| 34 | do_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 | |
| 43 | EXTRA_OECMAKE += "\ |
| 44 | -DCMAKE_INSTALL_LIBDIR:PATH=/lib \ |
| 45 | " |
developer | bc262d5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 46 | |
| 47 | do_install_append () { |
| 48 | install -dm 0755 ${D}/sbin |
| 49 | ln -s /usr/sbin/ubusd ${D}/sbin/ubusd |
developer | e93d6ea | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 50 | |
| 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} |
developer | bc262d5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 55 | } |
| 56 | |
developer | e93d6ea | 2022-07-25 13:16:11 +0800 | [diff] [blame] | 57 | PACKAGES =+ "\ |
| 58 | lib${PN}${ABI_VERSION} \ |
| 59 | lib${PN}-lua \ |
| 60 | lib${PN}-examples \ |
| 61 | ${PN}d \ |
| 62 | " |
| 63 | |
| 64 | FILES_SOLIBSDEV = "" |
| 65 | FILES_lib${PN}${ABI_VERSION} += "/lib/libubus.so" |
| 66 | FILES_lib${PN}-lua += "${libdir}/lua/5.3/*" |
| 67 | FILES_lib${PN}-examples += "${bindir}/*.lua" |
| 68 | FILES_${PN}d += "${sbindir} ${base_sbindir}" |