2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git
18 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
20 PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
22 PKG_BUILD_DEPENDS:=lua/host luac/host
25 include $(INCLUDE_DIR)/package.mk
27 define Package/luarocks
32 URL:=https://github.com/keplerproject/luarocks
33 DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
36 define Package/luarocks/description
37 LuaRocks is a deployment and management system for Lua modules.
40 # My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
42 --prefix=$(CONFIGURE_PREFIX) \
44 --with-lua=$(STAGING_DIR_HOSTPKG)
47 LUAROCKS_UNAME_S="Linux" \
48 LUAROCKS_UNAME_M="$(ARCH)"
51 $(call Build/Compile/Default,build)
54 define Package/luarocks/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin
58 $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share
59 $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc
62 $(eval $(call BuildPackage,luarocks))