aboutsummaryrefslogtreecommitdiff
path: root/lang/luasocket/Makefile
diff options
context:
space:
mode:
authorW. Michael Petullo <mike@flyn.org>2014-07-17 18:41:01 -0400
committerSteven Barth <steven@midlink.org>2014-07-19 14:08:11 +0200
commit57b3bffa8ce7c6a89b692fac60ef616d4ca3385d (patch)
tree6cbae66380cd7f77e4a5080becf94a0fe15afd7d /lang/luasocket/Makefile
parent7dff39a10fd8144ffbc448aa06cc89bf471693e3 (diff)
Copy luasocket package from old repository
Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'lang/luasocket/Makefile')
-rw-r--r--lang/luasocket/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile
new file mode 100644
index 000000000..ceb707729
--- /dev/null
+++ b/lang/luasocket/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:=luasocket
+PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
+PKG_VERSION:=3.0-rc1-20130909
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luasocket
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=LuaSocket
+ URL:=http://luasocket.luaforge.net/
+ MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+ DEPENDS:=+lua
+endef
+
+define Package/luasocket/description
+ LuaSocket is the most comprehensive networking support
+ library for the Lua language. It provides easy access to
+ TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/ \
+ LIBDIR="$(TARGET_LDFLAGS)" \
+ CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
+ LD="$(TARGET_CROSS)ld -shared" \
+ all
+endef
+
+
+define Package/luasocket/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
+ $(INSTALL_DIR) $(1)/usr/lib/lua/mime
+ ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
+ $(INSTALL_DIR) $(1)/usr/lib/lua/socket
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
+ ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
+endef
+
+$(eval $(call BuildPackage,luasocket))