Advertisement
svenhoefer

Untitled

Jun 16th, 2019
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.61 KB | None | 0 0
  1. # -----------------------------------------------------------------------------
  2.  
  3. HOST_LUAROCKS = $(HOST_DIR)/bin/luarocks
  4.  
  5. HOST_LUAROCKS_VER = 3.1.3
  6. HOST_LUAROCKS_SOURCE = luarocks-$(HOST_LUAROCKS_VER).tar.gz
  7.  
  8. $(ARCHIVE)/$(HOST_LUAROCKS_SOURCE):
  9.     $(WGET) https://luarocks.github.io/luarocks/releases/$(HOST_LUAROCKS_SOURCE)
  10.  
  11. HOST_LUAROCKS_CONFIG_DIR = $(HOST_DIR)/etc
  12. HOST_LUAROCKS_CONFIG_FILE = $(HOST_LUAROCKS_CONFIG_DIR)/luarocks/config-$(LUA_ABIVER).lua
  13.  
  14. host_luarocks: $(HOST_LUAROCKS)
  15. $(HOST_LUAROCKS): $(HOST_LUA) $(ARCHIVE)/$(HOST_LUAROCKS_SOURCE)
  16.     $(REMOVE)/luarocks-$(HOST_LUAROCKS_VER)
  17.     $(UNTAR)/$(HOST_LUAROCKS_SOURCE)
  18.     $(CHDIR)/luarocks-$(HOST_LUAROCKS_VER); \
  19.         ./configure $(SILENT_OPT) \
  20.             --prefix=$(HOST_DIR) \
  21.             --sysconfdir=$(HOST_LUAROCKS_CONFIG_DIR) \
  22.             --with-lua=$(HOST_DIR) \
  23.         ; \
  24.         $(MAKE) bootstrap; \
  25.         $(MAKE) install
  26.     sed -i '/name = "user"/d' $(HOST_LUAROCKS_CONFIG_FILE)
  27.     sed -i 's|root = "$(HOST_DIR)"|root = "$(TARGET_DIR)"|' $(HOST_LUAROCKS_CONFIG_FILE)
  28.     $(REMOVE)/luarocks-$(HOST_LUAROCKS_VER)
  29.     $(TOUCH)
  30.  
  31. # -----------------------------------------------------------------------------
  32.  
  33. LUA-STDLIB_VER = 41.2.2
  34. LUA-STDLIB_SOURCE = lua-stdlib-release-v$(LUA-STDLIB_VER).tar.gz
  35.  
  36. $(ARCHIVE)/$(LUA-STDLIB_SOURCE):
  37.     $(WGET) https://github.com/lua-stdlib/lua-stdlib/archive/release-v$(LUA-STDLIB_VER).tar.gz -O $@
  38.  
  39. $(D)/lua-stdlib: $(ARCHIVE)/$(LUA-STDLIB_SOURCE) | $(TARGET_DIR)
  40.     $(REMOVE)/lua-stdlib-release-v$(LUA-STDLIB_VER)
  41.     $(UNTAR)/$(LUA-STDLIB_SOURCE)
  42.     $(CHDIR)/lua-stdlib-release-v$(LUA-STDLIB_VER); \
  43.         $(HOST_LUAROCKS) install stdlib-$(LUA-STDLIB_VER)-1.rockspec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement