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_SOURCE_URL
:=https
://github.com
/keplerproject
/coxpcall.git
19 PKG_SOURCE_VERSION
:=979257892884816c97391dfd7b0a7b30dcc8f479
20 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/lua-coxpcall
31 URL
:=https
://github.com
/keplerproject
/coxpcall
35 define Package
/lua-coxpcall
/description
36 Coxpcall encapsulates the protected calls with a coroutine based loop
,
37 so errors can be dealed without the usual pcall
/xpcall issues with coroutines.
40 TARGET_CFLAGS
+= $(FPIC
)
41 # add make variable overrides here
44 define Build
/Configure
48 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
49 T
="$(BUILD_VARIANT)" \
50 LUA_DIR
="$(PKG_INSTALL_DIR)/usr/lib/lua" \
54 define Package
/lua-coxpcall
/install
55 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
56 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/coxpcall.lua
$(1)/usr
/lib
/lua
59 $(eval
$(call BuildPackage
,lua-coxpcall
))