pyyaml: update to version 3.11
[packages.git] / lang / luasocket / Makefile
1 #
2 # Copyright (C) 2009-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=luasocket
11 PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
12 PKG_VERSION:=3.0-rc1-20130909
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/luasocket
23   SUBMENU:=Lua
24   SECTION:=lang
25   CATEGORY:=Languages
26   TITLE:=LuaSocket
27   URL:=http://luasocket.luaforge.net/
28   DEPENDS:=+lua
29 endef
30
31 define Package/luasocket/description
32   LuaSocket is the most comprehensive networking support
33   library for the Lua language. It provides easy access to
34   TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
35 endef
36
37 define Build/Configure
38 endef
39
40 define Build/Compile
41         $(MAKE) -C $(PKG_BUILD_DIR)/ \
42                 LIBDIR="$(TARGET_LDFLAGS)" \
43                 CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
44                 LD="$(TARGET_CROSS)ld -shared" \
45                 all
46 endef
47
48
49 define Package/luasocket/install
50         $(INSTALL_DIR) $(1)/usr/lib/lua
51         $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
52         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
53         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
54         $(INSTALL_DIR) $(1)/usr/lib/lua/mime
55         ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
56         $(INSTALL_DIR) $(1)/usr/lib/lua/socket
57         $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
58         ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
59 endef
60
61 $(eval $(call BuildPackage,luasocket))