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.

97 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. PKGARCH:=all
  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))