projects/aports·blob v1.6 · refs

40 lines · 1010 B

1
2PACKAGE=abuild
3VERSION:=$(shell awk -F= '$$1 == "abuild_ver" {print $$2}' abuild)
4USR_BIN_FILES=abuild devbuild mkalpine buildrepo
5DISTFILES=$(USR_BIN_FILES) Makefile abuild.conf APKBUILD.proto
6
7
8prefix ?= /usr
9sysconfdir ?= /etc
10datadir ?= $(prefix)/share/$(PACKAGE)
11
12P=$(PACKAGE)-$(VERSION)
13
14help:
15 @echo "$(P) makefile"
16 @echo "usage: make install [ DESTDIR=<path> ]"
17 @echo " make dist"
18
19install: $(USR_BIN_FILES) abuild.conf APKBUILD.proto functions.sh
20 mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
21 $(DESTDIR)/$(datadir)
22 for i in $(USR_BIN_FILES); do\
23 install -m 755 $$i $(DESTDIR)/$(prefix)/bin/$$i;\
24 done
25 if [ -n "$(DESTDIR)" ] || [ ! -f "/$(sysconfdir)"/abuild.conf ]; then\
26 cp abuild.conf $(DESTDIR)/$(sysconfdir)/; \
27 fi
28 cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild
29 cp functions.sh $(DESTDIR)/$(datadir)/
30
31dist: $(P).tar.bz2
32
33$(P).tar.bz2: $(DISTFILES)
34 rm -rf $(P)
35 mkdir -p $(P)
36 cp $(DISTFILES) $(P)/
37 tar -cjf $@ $(P)
38 rm -rf $(P)
39
40.PHONY: install dist