Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lua-coxpcall
  9. PKG_VERSION:=1.15.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/lua-coxpcall
  21. SUBMENU:=Lua
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=Lua-Coxpcall
  25. URL:=https://github.com/keplerproject/coxpcall
  26. DEPENDS:=+lua
  27. endef
  28. define Package/lua-coxpcall/description
  29. Coxpcall encapsulates the protected calls with a coroutine based loop,
  30. so errors can be dealed without the usual pcall/xpcall issues with coroutines.
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. # add make variable overrides here
  34. MAKE_FLAGS +=
  35. define Build/Configure
  36. endef
  37. define Build/Compile
  38. $(MAKE) -C $(PKG_BUILD_DIR) \
  39. T="$(BUILD_VARIANT)" \
  40. LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  41. install
  42. endef
  43. define Package/lua-coxpcall/install
  44. $(INSTALL_DIR) $(1)/usr/lib/lua
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua
  46. endef
  47. $(eval $(call BuildPackage,lua-coxpcall))