LuaRocks: Add new package
Signed-off-by: Amr Hassan <amr.hassan@gmail.com>
This commit is contained in:
parent
c36bc9cee0
commit
857a85a60d
|
@ -0,0 +1,54 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=luarocks
|
||||||
|
PKG_VERSION:=2.2.0-rc1
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/keplerproject/$(PKG_NAME)/archive/
|
||||||
|
PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
|
||||||
|
PKG_INSTALL=1
|
||||||
|
PKG_BUILD_DEPENDS:=lua/host luac/host
|
||||||
|
PKG_LICENSE=GPL
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/luarocks
|
||||||
|
SUBMENU:=Lua
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=luarocks
|
||||||
|
URL:=https://github.com/keplerproject/luarocks
|
||||||
|
DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/luarocks/description
|
||||||
|
LuaRocks is a deployment and management system for Lua modules.
|
||||||
|
endef
|
||||||
|
|
||||||
|
# My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
|
||||||
|
CONFIGURE_ARGS = \
|
||||||
|
--prefix=$(CONFIGURE_PREFIX) \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--with-lua=$(STAGING_DIR_HOST)
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/Default,build)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/luarocks/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,luarocks))
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff -rupN luarocks/Makefile luarocks.new/Makefile
|
||||||
|
--- luarocks/Makefile 2015-02-19 13:24:07.027310956 +0200
|
||||||
|
+++ luarocks.new/Makefile 2015-02-22 13:28:24.497353543 +0200
|
||||||
|
@@ -104,7 +104,7 @@ build_bins: cleanup_bins
|
||||||
|
for f in $(BIN_FILES) ;\
|
||||||
|
do \
|
||||||
|
sed "1d" src/bin/$$f > src/bin/$$f.bak ;\
|
||||||
|
- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\
|
||||||
|
+ echo "#!/usr/bin/env lua" > src/bin/$$f ;\
|
||||||
|
echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\
|
||||||
|
cat src/bin/$$f.bak >> src/bin/$$f ;\
|
||||||
|
chmod +x src/bin/$$f ;\
|
||||||
|
Binary files luarocks/src/bin/.luarocks.swp and luarocks.new/src/bin/.luarocks.swp differ
|
Loading…
Reference in New Issue