2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git
19 PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
24 include $(INCLUDE_DIR)/package.mk
26 define Package/lua-wsapi/Default
31 URL:=https://keplerproject.github.io/wsapi/
35 define Package/lua-wsapi/Default/description
36 WSAPI is an API that abstracts the web server from Lua web applications
40 define Package/lua-wsapi-base
41 $(call Package/lua-wsapi/Default)
43 DEPENDS+= +luafilesystem
47 define Package/lua-wsapi-base/description
48 $(call Package/lua-wsapi/Default/description)
50 This package contains the basic stuff.
53 define Package/lua-wsapi-xavante
54 $(call Package/lua-wsapi/Default)
56 DEPENDS+= +lua-wsapi-base +lua-xavante
60 define Package/lua-wsapi-xavante/description
61 $(call Package/lua-wsapi/Default/description)
63 This package contains the Xavante stuff.
66 define Build/Configure
75 define Package/lua-wsapi-base/install
76 $(INSTALL_DIR) $(1)/usr/lib/lua
77 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin
81 $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
82 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi
85 define Package/lua-wsapi-xavante/install
86 $(INSTALL_DIR) $(1)/usr/bin
87 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin
89 $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
90 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi
94 $(eval $(call BuildPackage,lua-wsapi-base))
95 $(eval $(call BuildPackage,lua-wsapi-xavante))