Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / lang / lua-coxpcall / Makefile
1 #
2 # Copyright (C) 2009-2013 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-coxpcall
11 PKG_VERSION:=1.15.0
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_MIRROR_HASH:=2a99faec759aeb858eca3691a40609dd2710255497011e5754c4a2282232154b
18 PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git
19 PKG_SOURCE_PROTO:=git
20 PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479
21 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
22
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/lua-coxpcall
28 SUBMENU:=Lua
29 SECTION:=lang
30 CATEGORY:=Languages
31 TITLE:=Lua-Coxpcall
32 URL:=https://github.com/keplerproject/coxpcall
33 DEPENDS:=+lua
34 endef
35
36 define Package/lua-coxpcall/description
37 Coxpcall encapsulates the protected calls with a coroutine based loop,
38 so errors can be dealed without the usual pcall/xpcall issues with coroutines.
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42 # add make variable overrides here
43 MAKE_FLAGS +=
44
45 define Build/Configure
46 endef
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 T="$(BUILD_VARIANT)" \
51 LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
52 install
53 endef
54
55 define Package/lua-coxpcall/install
56 $(INSTALL_DIR) $(1)/usr/lib/lua
57 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua
58 endef
59
60 $(eval $(call BuildPackage,lua-coxpcall))