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.

58 lines
1.5 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:=1
  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_HOST)
  37. define Build/Compile
  38. $(call Build/Compile/Default,build)
  39. endef
  40. define Package/luarocks/install
  41. $(INSTALL_DIR) $(1)/usr/bin
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin
  44. $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share
  45. $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc
  46. endef
  47. $(eval $(call BuildPackage,luarocks))