You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luasocket
  9. PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
  10. PKG_VERSION:=3.0-rc1-20130909
  11. PKG_RELEASE:=4
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4
  14. PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/luasocket
  19. SUBMENU:=Lua
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. TITLE:=LuaSocket
  23. URL:=http://luasocket.luaforge.net/
  24. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  25. DEPENDS:=+lua
  26. endef
  27. define Package/luasocket/description
  28. LuaSocket is the most comprehensive networking support
  29. library for the Lua language. It provides easy access to
  30. TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
  31. endef
  32. define Build/Configure
  33. endef
  34. define Build/Compile
  35. $(MAKE) -C $(PKG_BUILD_DIR)/ \
  36. LIBDIR="$(TARGET_LDFLAGS)" \
  37. CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
  38. LD="$(TARGET_CROSS)ld -shared" \
  39. all
  40. endef
  41. define Package/luasocket/install
  42. $(INSTALL_DIR) $(1)/usr/lib/lua
  43. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
  46. $(INSTALL_DIR) $(1)/usr/lib/lua/mime
  47. ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
  48. $(INSTALL_DIR) $(1)/usr/lib/lua/socket
  49. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket
  51. ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
  52. endef
  53. $(eval $(call BuildPackage,luasocket))