2 # Copyright (C) 2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://luaforge.net
/frs
/download.php
/2664
16 PKG_MD5SUM
:=41445b138deb7bcfe97bff957503da8e
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/luasocket
25 URL
:=http
://luasocket.luaforge.net
/
29 define Package
/luasocket
/description
30 LuaSocket is the most comprehensive networking support
31 library for the Lua language. It provides easy access to
32 TCP
, UDP
, DNS
, SMTP
, FTP
, HTTP
, MIME and much more.
35 define Build
/Configure
39 $(MAKE
) -C
$(PKG_BUILD_DIR
)/ \
40 LIBDIR
="$(TARGET_LDFLAGS)" \
41 CC
="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
42 LD
="$(TARGET_CROSS)ld -shared" \
47 define Package
/luasocket
/install
48 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
49 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/{ltn12
,mime
,socket
}.lua
$(1)/usr
/lib
/lua
50 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mime.so
.1.0.2 $(1)/usr
/lib
/lua
51 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/socket.so
.2.0.2 $(1)/usr
/lib
/lua
52 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/mime
53 ln
-sf ..
/mime.so
.1.0.2 $(1)/usr
/lib
/lua
/mime
/core.so
54 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/socket
55 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/{ftp
,http
,smtp
,tp
,url
}.lua
$(1)/usr
/lib
/lua
/socket
56 ln
-sf ..
/socket.so
.2.0.2 $(1)/usr
/lib
/lua
/socket
/core.so
59 $(eval
$(call BuildPackage
,luasocket
))