Merge pull request #1516 from bk138/ola-0.9.6
[feed/packages.git] / lang / lua-cjson / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lua-cjson
11 PKG_VERSION:=2.1.0
12 PKG_RELEASE:=2
13 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
14 PKG_LICENSE:=MIT
15 PKG_LICENSE_FILES:=LICENSE
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/
19 PKG_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 define Package/lua-cjson
27 SUBMENU:=Lua
28 SECTION:=lang
29 CATEGORY:=Languages
30 TITLE:=Lua CJSON parser
31 URL:=https://github.com/mpx/lua-cjson
32 DEPENDS:= +lua
33 endef
34
35 define Package/lua-cjson/description
36 Lua CJSON is a fast JSON encoding/parsing module for Lua.
37 endef
38
39 CMAKE_OPTIONS += \
40 -DUSE_LUA=ON
41
42 define Package/lua-cjson/install
43 $(INSTALL_DIR) $(1)/usr/lib/lua
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
45
46 $(INSTALL_DIR) $(1)/usr/lib/lua/cjson
47 $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
48 endef
49
50 $(eval $(call BuildPackage,lua-cjson))