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.

62 lines
1.6 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.7
  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/luasec-$(PKG_VERSION)?
  13. PKG_HASH:=2176e95b1d2a72a3235ede5d2aa9838050feee55dade8fdbde4be7fdc66f3a31
  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_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/luasec
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=LuaSec
  26. URL:=https://github.com/brunoos/luasec
  27. DEPENDS:=+lua +libopenssl +luasocket
  28. endef
  29. define Package/luasec/description
  30. LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
  31. endef
  32. define Build/Configure
  33. endef
  34. MAKE_FLAGS += \
  35. INCDIR="$(TARGET_CPPFLAGS) -I." \
  36. LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
  37. LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  38. LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
  39. define Build/Compile
  40. $(call Build/Compile/Default,linux)
  41. endef
  42. define Package/luasec/install
  43. $(INSTALL_DIR) $(1)/usr/lib/lua
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
  45. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
  46. $(INSTALL_DIR) $(1)/usr/lib/lua/ssl
  47. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
  48. endef
  49. $(eval $(call BuildPackage,luasec))