summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-03-28 08:31:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-03-28 08:31:32 +0000
commit6a01187f9c4f0af100cf1c9bff9440f68c4bb67b (patch)
tree1ac2c02f05c23022910e426f3c559bd5e0fef028
parent200ac4f4c69ad0dee725248cb9762afea47d5f9d (diff)
downloadlua-aports-6a01187f9c4f0af100cf1c9bff9440f68c4bb67b.tar.bz2
lua-aports-6a01187f9c4f0af100cf1c9bff9440f68c4bb67b.tar.xz
make: add simple makefile for simplifying install
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dfb8a8e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+
+LUA_VERSION=5.2
+prefix?=/usr
+sharedir?=$(prefix)/share
+luasharedir?=$(sharedir)/lua/$(LUA_VERSION)
+bindir?=$(prefix)/bin
+
+aportsfiles= \
+ abuild.lua \
+ apkrepo.lua \
+ db.lua \
+ pkg.lua
+
+binfiles=buildrepo.lua
+
+all:
+ @echo "To install run:"
+ @echo " make install DESTDIR=<targetroot>"
+
+install: $(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 $$file $(DESTDIR)$(bindir)/$${file%.lua} || exit 1; \
+ done