2 # Copyright (C) 2009-2013 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
11 PKG_SOURCE_VERSION
:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
12 PKG_VERSION
:=3.0-rc1-20130909
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=https
://github.com
/diegonehab
/luasocket.git
18 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/luasocket
27 URL
:=http
://luasocket.luaforge.net
/
28 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
32 define Package
/luasocket
/description
33 LuaSocket is the most comprehensive networking support
34 library for the Lua language. It provides easy access to
35 TCP
, UDP
, DNS
, SMTP
, FTP
, HTTP
, MIME and much more.
38 define Build
/Configure
42 $(MAKE
) -C
$(PKG_BUILD_DIR
)/ \
43 LIBDIR
="$(TARGET_LDFLAGS)" \
44 CC
="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
45 LD
="$(TARGET_CROSS)ld -shared" \
50 define Package
/luasocket
/install
51 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
52 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/{ltn12
,mime
,socket
}.lua
$(1)/usr
/lib
/lua
53 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mime.so
.1.0.3 $(1)/usr
/lib
/lua
54 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/socket.so
.3.0-rc1
$(1)/usr
/lib
/lua
55 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/mime
56 ln
-sf ..
/mime.so
.1.0.3 $(1)/usr
/lib
/lua
/mime
/core.so
57 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/socket
58 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/{ftp
,http
,smtp
,tp
,url
,headers
}.lua
$(1)/usr
/lib
/lua
/socket
59 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/unix.so
$(1)/usr
/lib
/lua
/socket
60 ln
-sf ..
/socket.so
.3.0-rc1
$(1)/usr
/lib
/lua
/socket
/core.so
63 $(eval
$(call BuildPackage
,luasocket
))