You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.7 KiB

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