Changeset View
Changeset View
Standalone View
Standalone View
files/patch-Makefile
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- Makefile.orig 2018-07-19 20:42:18 UTC | |||||
+++ Makefile | |||||
@@ -36,29 +36,29 @@ luarocks-admin: config.unix | |||||
# Regular install | |||||
# ---------------------------------------- | |||||
-install: all $(PREFIX)/bin/luarocks $(PREFIX)/bin/luarocks-admin $(SYSCONFDIR)/config-$(LUA_VERSION).lua | |||||
- mkdir -p "$(PREFIX)/share/lua/$(LUA_VERSION)/luarocks" | |||||
- cp -a src/luarocks/* "$(PREFIX)/share/lua/$(LUA_VERSION)/luarocks" | |||||
+install: all $(DESTDIR)$(PREFIX)/bin/luarocks $(DESTDIR)$(PREFIX)/bin/luarocks-admin $(DESTDIR)$(SYSCONFDIR)/config-$(LUA_VERSION).lua | |||||
+ mkdir -p "$(DESTDIR)$(PREFIX)/share/lua/$(LUA_VERSION)/luarocks" | |||||
+ cp -a src/luarocks/* "$(DESTDIR)$(PREFIX)/share/lua/$(LUA_VERSION)/luarocks" | |||||
-$(PREFIX)/bin/luarocks: src/bin/luarocks config.unix | |||||
- mkdir -p "$(PREFIX)/bin" | |||||
+$(DESTDIR)$(PREFIX)/bin/luarocks: src/bin/luarocks config.unix | |||||
+ mkdir -p "$(DESTDIR)$(PREFIX)/bin" | |||||
echo "#!$(LUA_BINDIR)/$(LUA_INTERPRETER)" > $@ | |||||
echo "package.loaded['luarocks.core.hardcoded'] = { SYSCONFDIR = [[$(SYSCONFDIR)]] }" >> $@ | |||||
echo "package.path=[[$(PREFIX)/share/lua/$(LUA_VERSION)/?.lua;]] .. package.path" >> $@ | |||||
tail -n +2 src/bin/luarocks >> $@ | |||||
chmod +rx $@ | |||||
kevans: For these targets (including the vanilla install: target), it's usually preferable to use… | |||||
Not Done Inline ActionsYeah, but fixing that kind of thing would mean rewriting half the makefile, which I think is better addressed upstream (I've already mentioned it to them). My objective was to make it work within the existing structure of the makefile. andrew_tao173.riddles.org.uk: Yeah, but fixing that kind of thing would mean rewriting half the makefile, which I think is… | |||||
-$(PREFIX)/bin/luarocks-admin: src/bin/luarocks-admin config.unix | |||||
- mkdir -p "$(PREFIX)/bin" | |||||
+$(DESTDIR)$(PREFIX)/bin/luarocks-admin: src/bin/luarocks-admin config.unix | |||||
+ mkdir -p "$(DESTDIR)$(PREFIX)/bin" | |||||
echo "#!$(LUA_BINDIR)/$(LUA_INTERPRETER)" > $@ | |||||
echo "package.loaded['luarocks.core.hardcoded'] = { SYSCONFDIR = [[$(SYSCONFDIR)]] }" >> $@ | |||||
echo "package.path=[[$(PREFIX)/share/lua/$(LUA_VERSION)/?.lua;]] .. package.path" >> $@ | |||||
tail -n +2 src/bin/luarocks-admin >> $@ | |||||
chmod +rx $@ | |||||
-$(SYSCONFDIR)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in | |||||
- mkdir -p "$(SYSCONFDIR)" | |||||
- cp config-$(LUA_VERSION).lua.in "$(SYSCONFDIR)/config-$(LUA_VERSION).lua" | |||||
+$(DESTDIR)$(SYSCONFDIR)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in | |||||
+ mkdir -p "$(DESTDIR)$(SYSCONFDIR)" | |||||
+ cp config-$(LUA_VERSION).lua.in "$(DESTDIR)$(SYSCONFDIR)/config-$(LUA_VERSION).lua" | |||||
# ---------------------------------------- | |||||
# Binary build |
For these targets (including the vanilla install: target), it's usually preferable to use proper INSTALL_* macros rather than cp/echo + chmod