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.

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