Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@

VERSION = 0.7.0
LUA_VERSION = 5.2
LUA_VERSION = 5.3
prefix ?= /usr
sharedir ?= $(prefix)/share
luasharedir ?= $(sharedir)/lua/$(LUA_VERSION)
bindir ?= $(prefix)/bin
# Shebang to replace "/usr/bin/env lua" with. If empty, shebang is keep
# unchanged (default).
luashebang ?=

aportsfiles = \
abuild.lua \
Expand All @@ -19,13 +22,19 @@ all:
@echo "To install run:"
@echo " make install DESTDIR=<targetroot>"

# Note: -i.tmp is needed for compatibility with both GNU and BSD sed.
install: $(addprefix bin/,$(binfiles)) $(addprefix aports/,$(aportsfiles))
install -d $(DESTDIR)$(luasharedir)/aports \
$(DESTDIR)$(bindir)
install -m644 $(addprefix aports/,$(aportsfiles)) \
$(DESTDIR)$(luasharedir)/aports/
for file in $(binfiles); do \
install -m755 bin/$$file $(DESTDIR)$(bindir)/$${file%.lua} || exit 1; \
if [ -n "$(luashebang)" ]; then \
sed -i.tmp "s|^#!/usr/bin/env lua|#!$(luashebang)|" \
$(DESTDIR)$(bindir)/$${file%.lua} || exit 1; \
rm $(DESTDIR)$(bindir)/$${file%.lua}.tmp; \
fi; \
done

check: lint
Expand Down
2 changes: 1 addition & 1 deletion bin/ap.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/lua5.2
#!/usr/bin/env lua

local lfs = require('lfs')

Expand Down
2 changes: 1 addition & 1 deletion bin/buildrepo.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/lua5.2
#!/usr/bin/env lua

local abuild = require("aports.abuild")
local apkrepo = require("aports.apkrepo")
Expand Down