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.

96 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2015 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:=lua-wsapi
  9. PKG_VERSION:=1.6.1
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_MIRROR_HASH:=0e52ca377c135c8db1f824841e1a36c1ef7e4b4a594a5b70a2f402586901ca1f
  15. PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0
  18. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/lua-wsapi/Default
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=Lua WSAPI
  26. URL:=https://keplerproject.github.io/wsapi/
  27. DEPENDS:= +lua
  28. endef
  29. define Package/lua-wsapi/Default/description
  30. WSAPI is an API that abstracts the web server from Lua web applications
  31. endef
  32. define Package/lua-wsapi-base
  33. $(call Package/lua-wsapi/Default)
  34. TITLE+= base
  35. DEPENDS+= +luafilesystem
  36. VARIANT:=base
  37. endef
  38. define Package/lua-wsapi-base/description
  39. $(call Package/lua-wsapi/Default/description)
  40. .
  41. This package contains the basic stuff.
  42. endef
  43. define Package/lua-wsapi-xavante
  44. $(call Package/lua-wsapi/Default)
  45. TITLE+= xavante
  46. DEPENDS+= +lua-wsapi-base +lua-xavante
  47. VARIANT:=xavante
  48. endef
  49. define Package/lua-wsapi-xavante/description
  50. $(call Package/lua-wsapi/Default/description)
  51. .
  52. This package contains the Xavante stuff.
  53. endef
  54. define Build/Configure
  55. endef
  56. define Build/Compile
  57. endef
  58. define Build/Install
  59. endef
  60. define Package/lua-wsapi-base/install
  61. $(INSTALL_DIR) $(1)/usr/lib/lua
  62. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin
  65. $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
  66. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi
  67. endef
  68. define Package/lua-wsapi-xavante/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin
  71. $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi
  73. endef
  74. $(eval $(call BuildPackage,lua-wsapi-base))
  75. $(eval $(call BuildPackage,lua-wsapi-xavante))