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
)/ all \
40 LIBDIR
="$(TARGET_LDFLAGS)" \
41 CC
="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
42 LD
="$(TARGET_CROSS)ld -shared"
46 define Package
/luasocket
/install
47 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
48 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/mime.
{so
.1.0.2,lua
} $(1)/usr
/lib
/lua
49 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/socket.
{so
.2.0.2,lua
} $(1)/usr
/lib
/lua
50 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/mime
51 ln
-sf ..
/mime.so
.1.0.2 $(1)/usr
/lib
/lua
/mime
/core.so
52 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/socket
53 ln
-sf ..
/socket.so
.2.0.2 $(1)/usr
/lib
/lua
/socket
/core.so
56 $(eval
$(call BuildPackage
,luasocket
))