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
15 PKG_MIRROR_HASH
:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c
17 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE_URL
:=https
://github.com
/keplerproject
/luarocks.git
19 PKG_SOURCE_VERSION
:=v
$(PKG_VERSION
)
21 PKG_MAINTAINER
:=Amr Hassan
<amr.hassan@gmail.com
>
23 PKG_BUILD_DEPENDS
:=lua
/host luac
/host
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/luarocks
33 URL
:=https
://github.com
/keplerproject
/luarocks
34 DEPENDS
:=+lua
+luac
+liblua
+luasocket
+unzip
+curl
+luasec
37 define Package
/luarocks
/description
38 LuaRocks is a deployment and management system for Lua modules.
41 # My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
43 --prefix=$(CONFIGURE_PREFIX
) \
45 --with-lua
=$(STAGING_DIR_HOSTPKG
)
48 LUAROCKS_UNAME_S
="Linux" \
49 LUAROCKS_UNAME_M
="$(ARCH)"
52 $(call Build
/Compile
/Default
,build
)
55 define Package
/luarocks
/install
56 $(INSTALL_DIR
) $(1)/usr
/bin
57 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/luarocks-5.1
$(1)/usr
/bin
/luarocks
58 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/luarocks-admin-5.1
$(1)/usr
/bin
/luarocks-admin
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
$(1)/usr
/share
60 $(CP
) $(PKG_INSTALL_DIR
)/etc
$(1)/etc
63 $(eval
$(call BuildPackage
,luarocks
))