Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # Copyright (C) 2006-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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luarocks
  9. PKG_VERSION:=2.2.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git
  15. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  16. PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
  17. PKG_INSTALL=1
  18. PKG_BUILD_DEPENDS:=lua/host luac/host
  19. PKG_LICENSE=GPL
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/luarocks
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=luarocks
  26. URL:=https://github.com/keplerproject/luarocks
  27. DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
  28. endef
  29. define Package/luarocks/description
  30. LuaRocks is a deployment and management system for Lua modules.
  31. endef
  32. # My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
  33. CONFIGURE_ARGS = \
  34. --prefix=$(CONFIGURE_PREFIX) \
  35. --sysconfdir=/etc \
  36. --with-lua=$(STAGING_DIR_HOSTPKG)
  37. CONFIGURE_VARS = \
  38. LUAROCKS_UNAME_S="Linux" \
  39. LUAROCKS_UNAME_M="$(ARCH)"
  40. define Build/Compile
  41. $(call Build/Compile/Default,build)
  42. endef
  43. define Package/luarocks/install
  44. $(INSTALL_DIR) $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin
  47. $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share
  48. $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc
  49. endef
  50. $(eval $(call BuildPackage,luarocks))