Merge pull request #4940 from diizzyy/patch-95
[feed/packages.git] / lang / luarocks / Makefile
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_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c
16 PKG_SOURCE_PROTO:=git
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)
20
21 PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
22 PKG_INSTALL=1
23 PKG_BUILD_DEPENDS:=lua/host luac/host
24 PKG_LICENSE=GPL
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/luarocks
29 SUBMENU:=Lua
30 SECTION:=lang
31 CATEGORY:=Languages
32 TITLE:=luarocks
33 URL:=https://github.com/keplerproject/luarocks
34 DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
35 endef
36
37 define Package/luarocks/description
38 LuaRocks is a deployment and management system for Lua modules.
39 endef
40
41 # My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
42 CONFIGURE_ARGS = \
43 --prefix=$(CONFIGURE_PREFIX) \
44 --sysconfdir=/etc \
45 --with-lua=$(STAGING_DIR_HOSTPKG)
46
47 CONFIGURE_VARS = \
48 LUAROCKS_UNAME_S="Linux" \
49 LUAROCKS_UNAME_M="$(ARCH)"
50
51 define Build/Compile
52 $(call Build/Compile/Default,build)
53 endef
54
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
61 endef
62
63 $(eval $(call BuildPackage,luarocks))