From e6fb3ad037587556c0f1761b73a954f2c3b7a784 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 15 Feb 2009 13:47:55 +0000 Subject: [PATCH] Add luasocket, patch from OrazioPirataDelloSpazio git-svn-id: svn://svn.openwrt.org/openwrt/packages@14518 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- lang/luasocket/Makefile | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lang/luasocket/Makefile diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile new file mode 100644 index 000000000..b70b811a1 --- /dev/null +++ b/lang/luasocket/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luasocket +PKG_VERSION:=2.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2664/ +PKG_MD5SUM:=41445b138deb7bcfe97bff957503da8e + +include $(INCLUDE_DIR)/package.mk + +define Package/luasocket + SUBMENU:=LUA + SECTION:=lang + CATEGORY:=Languages + TITLE:=LUASec + URL:=http://luasocket.luaforge.net/ + 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)/ all \ + LIBDIR="-L$(STAGING_DIR)/usr/lib/" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LD="$(TARGET_CROSS)ld -shared" +endef + + +define Package/luasocket/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mime.{so.1.0.2,lua} $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/socket.{so.2.0.2,lua} $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,luasocket))