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.

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