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.

50 lines
1.2 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_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/lua-cjson
  21. SUBMENU:=Lua
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=Lua CJSON parser
  25. URL:=https://github.com/mpx/lua-cjson
  26. DEPENDS:= +lua
  27. endef
  28. define Package/lua-cjson/description
  29. Lua CJSON is a fast JSON encoding/parsing module for Lua.
  30. endef
  31. CMAKE_OPTIONS += \
  32. -DUSE_LUA=ON
  33. define Package/lua-cjson/install
  34. $(INSTALL_DIR) $(1)/usr/lib/lua
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
  36. $(INSTALL_DIR) $(1)/usr/lib/lua/cjson
  37. $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
  38. endef
  39. $(eval $(call BuildPackage,lua-cjson))