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.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/wsapi/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=48dc7aba0fd2e96a3e5ef51045b5d923964f6ae299de761aa0467031ad44e987
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/wsapi-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  16. PKG_LICENSE:=MIT
  17. PKG_BUILD_PARALLEL:=1
  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))