aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rw-r--r--lang/lpeg/Makefile48
-rw-r--r--lang/lua-cjson/Makefile50
-rw-r--r--lang/lua-copas/Makefile62
-rw-r--r--lang/lua-copas/patches/makefile.patch15
-rw-r--r--lang/lua-coxpcall/Makefile59
-rw-r--r--lang/lua-coxpcall/patches/config.patch4
-rw-r--r--lang/lua-lzlib/Makefile49
-rw-r--r--lang/lua-md5/Makefile75
-rw-r--r--lang/lua-md5/patches/config.patch19
-rw-r--r--lang/lua-md5/patches/makefile.patch10
-rw-r--r--lang/lua-mobdebug/Makefile56
-rw-r--r--lang/lua-rings/Makefile54
-rw-r--r--lang/lua-rings/patches/config.patch28
-rw-r--r--lang/lua-rings/patches/makefile.patch11
-rw-r--r--lang/lua-rs232/Makefile62
-rw-r--r--lang/lua-wsapi/Makefile95
-rw-r--r--lang/lua-xavante/Makefile58
-rw-r--r--lang/lzmq/Makefile48
18 files changed, 803 insertions, 0 deletions
diff --git a/lang/lpeg/Makefile b/lang/lpeg/Makefile
new file mode 100644
index 000000000..ee8a4ef1f
--- /dev/null
+++ b/lang/lpeg/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lpeg
+PKG_VERSION:=0.12.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
+PKG_MD5SUM:=fabb614eb46e370d4f6b8fd82d17ca7e
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lpeg
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=LPeg
+ URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
+ DEPENDS:=+lua
+endef
+
+define Package/lpeg/description
+ LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs)
+endef
+
+define Build/Configure
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lpeg/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lpeg))
diff --git a/lang/lua-cjson/Makefile b/lang/lua-cjson/Makefile
new file mode 100644
index 000000000..fd489f2b4
--- /dev/null
+++ b/lang/lua-cjson/Makefile
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-cjson
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/
+PKG_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lua-cjson
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua CJSON parser
+ URL:=https://github.com/mpx/lua-cjson
+ DEPENDS:= +lua +libzmq
+endef
+
+define Package/lua-cjson/description
+ Lua CJSON is a fast JSON encoding/parsing module for Lua.
+endef
+
+CMAKE_OPTIONS += \
+ -DUSE_LUA=ON
+
+define Package/lua-cjson/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
+
+ $(INSTALL_DIR) $(1)/usr/lib/lua/cjson
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
+endef
+
+$(eval $(call BuildPackage,lua-cjson))
diff --git a/lang/lua-copas/Makefile b/lang/lua-copas/Makefile
new file mode 100644
index 000000000..4f073e21f
--- /dev/null
+++ b/lang/lua-copas/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2009-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-copas
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/copas.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=f39a80add9f7c010ac979297652bbaaea0360a27
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-copas
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua-Copas
+ URL:=https://github.com/keplerproject/copas
+ DEPENDS:=+lua
+endef
+
+define Package/lua-copas/description
+ Copas is a dispatcher based on coroutines that can be used by TCP/IP servers.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ T="$(BUILD_VARIANT)" \
+ PREFIX="$(PKG_INSTALL_DIR)/usr" \
+ install
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lua-copas/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DIR) $(1)/usr/lib/lua/copas
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas.lua $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/ftp.lua $(1)/usr/lib/lua/copas
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/smtp.lua $(1)/usr/lib/lua/copas
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/http.lua $(1)/usr/lib/lua/copas
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/limit.lua $(1)/usr/lib/lua/copas
+endef
+
+$(eval $(call BuildPackage,lua-copas))
diff --git a/lang/lua-copas/patches/makefile.patch b/lang/lua-copas/patches/makefile.patch
new file mode 100644
index 000000000..10e473403
--- /dev/null
+++ b/lang/lua-copas/patches/makefile.patch
@@ -0,0 +1,15 @@
+--- lua-copas-1.2.1_org/Makefile 2014-06-04 16:39:17.451563827 +0800
++++ lua-copas-1.2.1/Makefile 2014-06-04 16:39:41.115563309 +0800
+@@ -1,10 +1,10 @@
+ # $Id: Makefile,v 1.3 2007/10/29 22:50:16 carregal Exp $
+
+ # Default prefix
+-PREFIX = /usr/local
++PREFIX ?= $(DESTDIR)/usr
+
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR= $(PREFIX)/share/lua/5.1
++LUA_DIR= $(PREFIX)/lib/lua
+
+ install:
+ mkdir -p $(LUA_DIR)/copas
diff --git a/lang/lua-coxpcall/Makefile b/lang/lua-coxpcall/Makefile
new file mode 100644
index 000000000..6ca3ff848
--- /dev/null
+++ b/lang/lua-coxpcall/Makefile
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2009-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-coxpcall
+PKG_VERSION:=1.15.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-coxpcall
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua-Coxpcall
+ URL:=https://github.com/keplerproject/coxpcall
+ DEPENDS:=+lua
+endef
+
+define Package/lua-coxpcall/description
+ Coxpcall encapsulates the protected calls with a coroutine based loop,
+ so errors can be dealed without the usual pcall/xpcall issues with coroutines.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ T="$(BUILD_VARIANT)" \
+ LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+ install
+endef
+
+define Package/lua-coxpcall/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-coxpcall))
diff --git a/lang/lua-coxpcall/patches/config.patch b/lang/lua-coxpcall/patches/config.patch
new file mode 100644
index 000000000..2a1dbfd99
--- /dev/null
+++ b/lang/lua-coxpcall/patches/config.patch
@@ -0,0 +1,4 @@
+--- lua-coxpcall-1.15.0_org/config 1970-01-01 08:00:00.000000000 +0800
++++ lua-coxpcall-1.15.0/config 2014-06-04 16:51:55.487547258 +0800
+@@ -0,0 +1 @@
++LUA_DIR ?=$(DESTDIR)/usr/lib/lua
diff --git a/lang/lua-lzlib/Makefile b/lang/lua-lzlib/Makefile
new file mode 100644
index 000000000..4b9468789
--- /dev/null
+++ b/lang/lua-lzlib/Makefile
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-lzlib
+PKG_VERSION:=0.4.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9fa3993bb4504fbbc10511cde141e1c6a48c072d
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-lzlib
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua zlib binding
+ URL:=http://github.com/LuaDist/lzlib
+ DEPENDS:= +lua +zlib
+endef
+
+define Package/lua-lzlib/description
+ A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package.
+endef
+
+define Build/Install
+endef
+
+define Package/lua-lzlib/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/
+
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,lua-lzlib))
diff --git a/lang/lua-md5/Makefile b/lang/lua-md5/Makefile
new file mode 100644
index 000000000..36e0d9db9
--- /dev/null
+++ b/lang/lua-md5/Makefile
@@ -0,0 +1,75 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-md5
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-md5
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua-MD5
+ URL:=https://github.com/keplerproject/md5
+ DEPENDS:=+lua
+endef
+
+define Package/lua-md5/description
+ MD5 offers basic cryptographic facilities for Lua
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ PREFIX="$(STAGING_DIR)/usr" \
+ LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
+ clean
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ PREFIX="$(STAGING_DIR)/usr" \
+ LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
+ LIB_OPTION="-shared" \
+ CC="$(TARGET_CROSS)gcc" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ all
+endef
+
+define Build/Install
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+ LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+ install
+endef
+
+define Package/lua-md5/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua
+ $(INSTALL_DIR) $(1)/usr/lib/lua/md5
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so
+endef
+
+$(eval $(call BuildPackage,lua-md5))
diff --git a/lang/lua-md5/patches/config.patch b/lang/lua-md5/patches/config.patch
new file mode 100644
index 000000000..abea3a88c
--- /dev/null
+++ b/lang/lua-md5/patches/config.patch
@@ -0,0 +1,19 @@
+--- lua-md5-1.2/config 2014-06-04 16:55:50.000000000 +0800
++++ lua-md5-1.2_new/config 2014-06-04 16:57:54.223539416 +0800
+@@ -1,13 +1,13 @@
+ # Installation directories
+
+ # Default prefix
+-PREFIX = /usr/local
++PREFIX = /usr
+
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
++LUA_LIBDIR= $(PREFIX)/lib/lua
+
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR= $(PREFIX)/share/lua/5.1
++LUA_DIR= $(PREFIX)/lib/lua
+
+ # Lua includes directory
+ LUA_INC= $(PREFIX)/include
diff --git a/lang/lua-md5/patches/makefile.patch b/lang/lua-md5/patches/makefile.patch
new file mode 100644
index 000000000..89a2e33cd
--- /dev/null
+++ b/lang/lua-md5/patches/makefile.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.orig 2014-06-04 17:16:40.083514808 +0800
++++ b/Makefile 2014-06-04 17:17:27.111513780 +0800
+@@ -1,6 +1,6 @@
+ # $Id: Makefile,v 1.7 2007/10/11 00:02:56 carregal Exp $
+
+-CONFIG= ./config
++CFLAGS+= -fPIC
+
+ include $(CONFIG)
+
diff --git a/lang/lua-mobdebug/Makefile b/lang/lua-mobdebug/Makefile
new file mode 100644
index 000000000..3d11539d9
--- /dev/null
+++ b/lang/lua-mobdebug/Makefile
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-mobdebug
+PKG_VERSION:=0.61
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/pkulchenko/MobDebug.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9a03aa59696647ba3b7f9ae2f29a9f28532a4feb
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-mobdebug
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua-MobDebug
+ URL:=https://github.com/pkulchenko/MobDebug
+ DEPENDS:=+lua
+endef
+
+define Package/lua-mobdebug/description
+ MobDebug is a remote debugger for Lua (including Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT 2.x).
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lua-mobdebug/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mobdebug.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-mobdebug))
diff --git a/lang/lua-rings/Makefile b/lang/lua-rings/Makefile
new file mode 100644
index 000000000..9b39c96be
--- /dev/null
+++ b/lang/lua-rings/Makefile
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-rings
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/rings.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=2b8a900f8b9dbde304859a3ac9d437795c3fdde3
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-rings
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua-Rings
+ URL:=http://www.inf.puc-rio.br/~roberto/lua-rings/
+ DEPENDS:=+lua
+endef
+
+define Package/lua-rings/description
+ Rings is a library which provides a way to create new Lua states from within Lua.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Package/lua-rings/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rings.so $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/stable.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-rings))
diff --git a/lang/lua-rings/patches/config.patch b/lang/lua-rings/patches/config.patch
new file mode 100644
index 000000000..5740faea9
--- /dev/null
+++ b/lang/lua-rings/patches/config.patch
@@ -0,0 +1,28 @@
+--- lua-rings-1.3.0_org/config 2014-06-04 15:24:24.223662038 +0800
++++ lua-rings-1.3.0/config 2014-06-04 16:16:15.183594040 +0800
+@@ -1,15 +1,15 @@
+ # Installation directories
+
+ # Default prefix
+-PREFIX ?= /usr/local
++PREFIX ?= /usr
+
+ DESTDIR ?= /
+
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR ?= $(PREFIX)/lib/lua/5.1
++LUA_LIBDIR ?= $(PREFIX)/lib/lua
+
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR ?= $(PREFIX)/share/lua/5.1
++LUA_DIR ?= $(PREFIX)/lib/lua
+
+ # Lua includes directory
+ LUA_INC ?= $(PREFIX)/include
+@@ -24,6 +24,5 @@
+ WARN ?= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith -pedantic
+ INCS ?= -I$(LUA_INC)
+ CFLAGS ?= $(WARN) $(INCS)
+-CC ?= gcc
+
+ # $Id: config,v 1.7 2007/10/29 22:51:39 carregal Exp $
diff --git a/lang/lua-rings/patches/makefile.patch b/lang/lua-rings/patches/makefile.patch
new file mode 100644
index 000000000..8bb055120
--- /dev/null
+++ b/lang/lua-rings/patches/makefile.patch
@@ -0,0 +1,11 @@
+--- lua-rings-1.3.0_org/Makefile 2014-06-04 15:24:37.583661746 +0800
++++ lua-rings-1.3.0/Makefile 2014-06-04 15:23:41.611662970 +0800
+@@ -3,6 +3,8 @@
+ T= rings
+ CONFIG= ./config
+
++CFLAGS+= -fPIC
++
+ include $(CONFIG)
+
+ SRCS= src/rings.c
diff --git a/lang/lua-rs232/Makefile b/lang/lua-rs232/Makefile
new file mode 100644
index 000000000..7ef5ac7e3
--- /dev/null
+++ b/lang/lua-rs232/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-rs232
+PKG_VERSION:=1.0.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/srdgame/librs232.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-rs232
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua Serial Library
+ URL:=https://github.com/srdgame/librs232
+ DEPENDS:= +lua
+endef
+
+define Package/lua-rs232/description
+ multiplatform library for serial communications over RS-232
+endef
+
+CONFIGURE_ARGS += \
+ --with-lua-inc=$(STAGING_DIR)/usr/include \
+ --with-lua-lib=$(STAGING_DIR)/usr/lib
+
+#define Build/Configure
+# ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
+# $(call Build/Configure/Default)
+#endef
+define Build/Configure
+endef
+
+define Build/Compile
+ (cd "$(PKG_BUILD_DIR)"; $(TARGET_CC) src/rs232.c src/rs232_posix.c bindings/lua/luars232.c -DLUAROCKS_HACK -std=gnu99 -I./include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -fPIC -shared -o luars232.so)
+endef
+
+define Build/Install
+endef
+
+define Package/lua-rs232/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/luars232.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,lua-rs232))
diff --git a/lang/lua-wsapi/Makefile b/lang/lua-wsapi/Makefile
new file mode 100644
index 000000000..b382ad640
--- /dev/null
+++ b/lang/lua-wsapi/Makefile
@@ -0,0 +1,95 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-wsapi
+PKG_VERSION:=1.6.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-wsapi/Default
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua WSAPI
+ URL:=http://www.keplerproject.org/wsapi
+ DEPENDS:= +lua
+endef
+
+define Package/lua-wsapi/Default/description
+ WSAPI is an API that abstracts the web server from Lua web applications
+endef
+
+
+define Package/lua-wsapi-base
+$(call Package/lua-wsapi/Default)
+ TITLE+= base
+ DEPENDS+= +luafilesystem
+ VARIANT:=base
+endef
+
+define Package/lua-wsapi-base/description
+$(call Package/lua-wsapi/Default/description)
+ .
+ This package contains the basic stuff.
+endef
+
+define Package/lua-wsapi-xavante
+$(call Package/lua-wsapi/Default)
+ TITLE+= xavante
+ DEPENDS+= +lua-wsapi-base +lua-xavante
+ VARIANT:=xavante
+endef
+
+define Package/lua-wsapi-xavante/description
+$(call Package/lua-wsapi/Default/description)
+ .
+ This package contains the Xavante stuff.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+define Package/lua-wsapi-base/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin
+
+ $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi
+endef
+
+define Package/lua-wsapi-xavante/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin
+
+ $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi
+endef
+
+
+$(eval $(call BuildPackage,lua-wsapi-base))
+$(eval $(call BuildPackage,lua-wsapi-xavante))
diff --git a/lang/lua-xavante/Makefile b/lang/lua-xavante/Makefile
new file mode 100644
index 000000000..13b66ee60
--- /dev/null
+++ b/lang/lua-xavante/Makefile
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-xavante
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/xavante.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9825b905133e14d37a4c179f2d02367ab93f1ef6
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-xavante
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Xavante Web Server
+ URL:=http://www.keplerproject.org/xavante
+ DEPENDS:= +lua
+endef
+
+define Package/lua-xavante/description
+ Xavante is a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers.
+endef
+
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+define Package/lua-xavante/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/sajax/sajax.lua $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/xavante.lua $(1)/usr/lib/lua
+
+ $(INSTALL_DIR) $(1)/usr/lib/lua/xavante
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/{cgiluahandler,encoding,filehandler,httpd,mime,patternhandler,redirecthandler,vhostshandler,indexhandler,urlhandler,ruleshandler}.lua $(1)/usr/lib/lua/xavante
+endef
+
+$(eval $(call BuildPackage,lua-xavante))
diff --git a/lang/lzmq/Makefile b/lang/lzmq/Makefile
new file mode 100644
index 000000000..bc1587ee9
--- /dev/null
+++ b/lang/lzmq/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lzmq
+PKG_VERSION:=0.4.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/zip/v0.4.2?
+PKG_MD5SUM:=6789895c925e7eb9036e526181ec1a33
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lzmq
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua ZeroMQ binding
+ URL:=https://github.com/moteus/lzmq/
+ DEPENDS:= +lua +libzmq
+endef
+
+define Package/lzmq/description
+ LZMQ is a Lua binding to ZeroMQ.
+endef
+
+CMAKE_OPTIONS += \
+ -DUSE_LUA=ON
+
+define Package/lzmq/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq.so $(1)/usr/lib/lua/
+
+ $(INSTALL_DIR) $(1)/usr/lib/lua/lzmq
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq/timer.so $(1)/usr/lib/lua/lzmq
+ $(CP) -R $(PKG_BUILD_DIR)/src/lua/lzmq/* $(1)/usr/lib/lua/lzmq
+endef
+
+$(eval $(call BuildPackage,lzmq))