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.

66 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.8
  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:=80ef0f41e146c4c4914c910c992043e46f284b134574061556f040ac738f7d27
  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. TARGET_CFLAGS += $(FPIC)
  35. TARGET_LDFLAGS += $(FPIC)
  36. MAKE_FLAGS += \
  37. LD="$(TARGET_CC)" \
  38. INC_PATH="" \
  39. LIB_PATH="" \
  40. LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  41. LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
  42. define Build/Compile
  43. $(call Build/Compile/Default,linux)
  44. endef
  45. define Package/luasec/install
  46. $(INSTALL_DIR) $(1)/usr/lib/lua
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
  48. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
  49. $(INSTALL_DIR) $(1)/usr/lib/lua/ssl
  50. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
  51. endef
  52. $(eval $(call BuildPackage,luasec))