Makefile 1.8 KB

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