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.

61 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2009-2014 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:=luasec
  9. PKG_VERSION:=0.6
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
  13. PKG_HASH:=cef3a35c18beb8a54d9c8ce6260a4cabbd9a386de8711320d084daffad0aed5d
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
  15. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/luasec
  21. SUBMENU:=Lua
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=LuaSec
  25. URL:=https://github.com/brunoos/luasec
  26. DEPENDS:=+lua +libopenssl +luasocket
  27. endef
  28. define Package/luasec/description
  29. LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
  30. endef
  31. define Build/Configure
  32. endef
  33. MAKE_FLAGS += \
  34. INCDIR="$(TARGET_CPPFLAGS) -I." \
  35. LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
  36. LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  37. LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
  38. define Build/Compile
  39. $(call Build/Compile/Default,linux)
  40. endef
  41. define Package/luasec/install
  42. $(INSTALL_DIR) $(1)/usr/lib/lua
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
  44. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
  45. $(INSTALL_DIR) $(1)/usr/lib/lua/ssl
  46. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
  47. endef
  48. $(eval $(call BuildPackage,luasec))