You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lua-cjson
  9. PKG_VERSION:=2.1.0
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/
  16. PKG_HASH:=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778
  17. HOST_BUILD_DEPENDS:=lua/host
  18. include $(INCLUDE_DIR)/host-build.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../devel/ninja/ninja-cmake.mk
  21. define Package/lua-cjson
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=Lua CJSON parser
  26. URL:=https://github.com/mpx/lua-cjson
  27. DEPENDS:= +lua
  28. endef
  29. define Package/lua-cjson/description
  30. Lua CJSON is a fast JSON encoding/parsing module for Lua.
  31. endef
  32. CMAKE_OPTIONS += \
  33. -DUSE_LUA=ON
  34. CMAKE_HOST_OPTIONS += \
  35. -DLUA_MATH_LIBRARY=m
  36. define Package/lua-cjson/install
  37. $(INSTALL_DIR) $(1)/usr/lib/lua
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
  39. $(INSTALL_DIR) $(1)/usr/lib/lua/cjson
  40. $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
  41. endef
  42. $(eval $(call HostBuild))
  43. $(eval $(call BuildPackage,lua-cjson))