lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1630B)


      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 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=luarocks
     11 PKG_VERSION:=2.2.2
     12 PKG_RELEASE:=2
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     15 PKG_SOURCE_PROTO:=git
     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)
     19 
     20 PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
     21 PKG_INSTALL=1
     22 PKG_BUILD_DEPENDS:=lua/host luac/host
     23 PKG_LICENSE=GPL
     24 
     25 include $(INCLUDE_DIR)/package.mk
     26 
     27 define Package/luarocks
     28   SUBMENU:=Lua
     29   SECTION:=lang
     30   CATEGORY:=Languages
     31   TITLE:=luarocks
     32   URL:=https://github.com/keplerproject/luarocks
     33   DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
     34 endef
     35 
     36 define Package/luarocks/description
     37 	LuaRocks is a deployment and management system for Lua modules.
     38 endef
     39 
     40 # My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
     41 CONFIGURE_ARGS = \
     42     --prefix=$(CONFIGURE_PREFIX) \
     43     --sysconfdir=/etc \
     44     --with-lua=$(STAGING_DIR_HOSTPKG)
     45 
     46 CONFIGURE_VARS = \
     47 	LUAROCKS_UNAME_S="Linux" \
     48 	LUAROCKS_UNAME_M="$(ARCH)"
     49 
     50 define Build/Compile
     51 	$(call Build/Compile/Default,build)
     52 endef
     53 
     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
     60 endef
     61 
     62 $(eval $(call BuildPackage,luarocks))