2011-02-07 18:17:12 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libubox
|
2021-06-06 15:15:08 +00:00
|
|
|
PKG_RELEASE=2
|
2011-02-07 18:17:12 +00:00
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2018-01-05 09:46:06 +00:00
|
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
2021-05-17 15:58:52 +00:00
|
|
|
PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca
|
|
|
|
PKG_SOURCE_DATE:=2021-05-16
|
|
|
|
PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
|
2021-02-12 09:10:41 +00:00
|
|
|
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
2011-02-07 18:17:12 +00:00
|
|
|
CMAKE_INSTALL:=1
|
|
|
|
|
2014-11-03 09:56:44 +00:00
|
|
|
PKG_LICENSE:=ISC
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=
|
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2012-10-08 11:41:02 +00:00
|
|
|
|
2012-10-30 21:50:07 +00:00
|
|
|
PKG_BUILD_DEPENDS:=lua
|
2018-06-14 18:10:04 +00:00
|
|
|
HOST_BUILD_DEPENDS:=libjson-c/host
|
2018-08-06 16:00:15 +00:00
|
|
|
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
|
2012-10-30 21:50:07 +00:00
|
|
|
|
2011-02-07 18:17:12 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2017-02-17 09:49:14 +00:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2011-02-07 18:17:12 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
|
|
|
|
define Package/libubox
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Basic utility library
|
2021-02-12 09:10:41 +00:00
|
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
2011-02-11 02:08:04 +00:00
|
|
|
DEPENDS:=
|
2011-02-07 18:17:12 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libblobmsg-json
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=blobmsg <-> json conversion library
|
2021-02-12 09:10:41 +00:00
|
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
2013-07-01 15:36:12 +00:00
|
|
|
DEPENDS:=+libjson-c +libubox
|
2011-02-07 18:17:12 +00:00
|
|
|
endef
|
|
|
|
|
2011-08-11 22:09:11 +00:00
|
|
|
define Package/jshn
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2014-08-20 18:21:59 +00:00
|
|
|
DEPENDS:=+libjson-c +libubox +libblobmsg-json
|
2011-08-11 22:09:11 +00:00
|
|
|
TITLE:=JSON SHell Notation
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/jshn/description
|
|
|
|
Library for parsing and generating JSON from shell scripts
|
|
|
|
endef
|
2011-02-07 18:17:12 +00:00
|
|
|
|
2013-03-13 15:44:08 +00:00
|
|
|
define Package/libjson-script
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=+libubox
|
2021-02-12 09:10:41 +00:00
|
|
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
2013-03-13 15:44:08 +00:00
|
|
|
TITLE:=Minimalistic JSON based scripting engine
|
|
|
|
endef
|
|
|
|
|
2013-09-17 21:44:52 +00:00
|
|
|
define Package/libubox-lua
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libubox +liblua
|
|
|
|
TITLE:=Lua binding for the OpenWrt Basic utility library
|
|
|
|
endef
|
|
|
|
|
2011-02-07 18:17:12 +00:00
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
2021-06-06 21:24:43 +00:00
|
|
|
CMAKE_OPTIONS += \
|
2021-02-15 17:07:51 +00:00
|
|
|
-DLUAPATH=/usr/lib/lua \
|
|
|
|
-DABIVERSION="$(PKG_ABI_VERSION)"
|
2011-02-07 18:17:12 +00:00
|
|
|
|
|
|
|
define Package/libubox/install
|
|
|
|
$(INSTALL_DIR) $(1)/lib/
|
2021-02-15 17:07:51 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so.* $(1)/lib/
|
2011-02-11 02:11:12 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libblobmsg-json/install
|
|
|
|
$(INSTALL_DIR) $(1)/lib/
|
2021-02-15 17:07:51 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so.* $(1)/lib/
|
2011-02-07 18:17:12 +00:00
|
|
|
endef
|
|
|
|
|
2011-08-11 22:09:11 +00:00
|
|
|
define Package/jshn/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
|
|
|
|
endef
|
|
|
|
|
2013-03-13 15:44:08 +00:00
|
|
|
define Package/libjson-script/install
|
|
|
|
$(INSTALL_DIR) $(1)/lib/
|
2021-02-15 17:07:51 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so.* $(1)/lib/
|
2013-03-13 15:44:08 +00:00
|
|
|
endef
|
|
|
|
|
2013-09-17 21:44:52 +00:00
|
|
|
define Package/libubox-lua/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
|
|
|
|
endef
|
|
|
|
|
2017-02-17 09:49:14 +00:00
|
|
|
|
|
|
|
CMAKE_HOST_OPTIONS += \
|
|
|
|
-DBUILD_LUA=OFF \
|
|
|
|
-DBUILD_EXAMPLES=OFF \
|
2018-08-14 21:54:59 +00:00
|
|
|
-DCMAKE_SKIP_RPATH=FALSE \
|
|
|
|
-DCMAKE_MACOSX_RPATH=1 \
|
|
|
|
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \
|
2017-02-17 09:49:14 +00:00
|
|
|
|
2011-02-07 18:17:12 +00:00
|
|
|
$(eval $(call BuildPackage,libubox))
|
2011-02-11 02:09:31 +00:00
|
|
|
$(eval $(call BuildPackage,libblobmsg-json))
|
2011-08-11 22:09:11 +00:00
|
|
|
$(eval $(call BuildPackage,jshn))
|
2013-03-13 15:44:08 +00:00
|
|
|
$(eval $(call BuildPackage,libjson-script))
|
2013-09-17 21:44:52 +00:00
|
|
|
$(eval $(call BuildPackage,libubox-lua))
|
2017-02-17 09:49:14 +00:00
|
|
|
$(eval $(call HostBuild))
|