2 # Copyright (C) 2009-2013 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
10 PKG_NAME
:=lua-coxpcall
13 PKG_MAINTAINER
:=Dirk Chang
<dirk@kooiot.com
>
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_MIRROR_HASH
:=e037c1aa1d2a2b213fca144d86cd5b5cf2cd77cec6d8f52d056add7ea806f0dc
18 PKG_SOURCE_URL
:=https
://github.com
/keplerproject
/coxpcall.git
20 PKG_SOURCE_VERSION
:=ea22f44e490430e40217f0792bf82eaeaec51903
21 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/lua-coxpcall
32 URL
:=https
://github.com
/keplerproject
/coxpcall
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.
41 TARGET_CFLAGS
+= $(FPIC
)
42 # add make variable overrides here
45 define Build
/Configure
49 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
50 T
="$(BUILD_VARIANT)" \
51 LUA_DIR
="$(PKG_INSTALL_DIR)/usr/lib/lua" \
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
60 $(eval
$(call BuildPackage
,lua-coxpcall
))