First Commit
[librecmc/package-feed.git] / lang / lua-wsapi / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lua-wsapi
11 PKG_VERSION:=1.6.1
12 PKG_RELEASE:=1
13 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
14 PKG_LICENSE:=MIT
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/lua-wsapi/Default
27   SUBMENU:=Lua
28   SECTION:=lang
29   CATEGORY:=Languages
30   TITLE:=Lua WSAPI
31   URL:=https://keplerproject.github.io/wsapi/
32   DEPENDS:= +lua
33 endef
34
35 define Package/lua-wsapi/Default/description
36   WSAPI is an API that abstracts the web server from Lua web applications
37 endef
38
39
40 define Package/lua-wsapi-base
41 $(call Package/lua-wsapi/Default)
42   TITLE+= base
43   DEPENDS+= +luafilesystem
44   VARIANT:=base
45 endef
46
47 define Package/lua-wsapi-base/description
48 $(call Package/lua-wsapi/Default/description)
49  .
50  This package contains the basic stuff.
51 endef
52
53 define Package/lua-wsapi-xavante
54 $(call Package/lua-wsapi/Default)
55   TITLE+= xavante
56   DEPENDS+= +lua-wsapi-base +lua-xavante
57   VARIANT:=xavante
58 endef
59
60 define Package/lua-wsapi-xavante/description
61 $(call Package/lua-wsapi/Default/description)
62  .
63  This package contains the Xavante stuff.
64 endef
65
66 define Build/Configure
67 endef
68
69 define Build/Compile
70 endef
71
72 define Build/Install
73 endef
74
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
80
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
83 endef
84
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
88
89         $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
90         $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi
91 endef
92
93
94 $(eval $(call BuildPackage,lua-wsapi-base))
95 $(eval $(call BuildPackage,lua-wsapi-xavante))