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.

65 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.9
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=6b6b94e8517bf6baf545fad29a2112f9ac7957ad85b4aae8e0727bec77d7a325
  14. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_PARALLEL:=1
  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. TARGET_CFLAGS += $(FPIC)
  34. TARGET_LDFLAGS += $(FPIC)
  35. MAKE_FLAGS += \
  36. LD="$(TARGET_CC)" \
  37. INC_PATH="" \
  38. LIB_PATH="" \
  39. LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  40. LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
  41. define Build/Compile
  42. $(call Build/Compile/Default,linux)
  43. endef
  44. define Package/luasec/install
  45. $(INSTALL_DIR) $(1)/usr/lib/lua
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
  47. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
  48. $(INSTALL_DIR) $(1)/usr/lib/lua/ssl
  49. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
  50. endef
  51. $(eval $(call BuildPackage,luasec))