summaryrefslogtreecommitdiff
path: root/Makefile
blob: d5da5a09a369772238f94b55f3cd986e68f8bef5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PACKAGE=abuild
VERSION=0.3
DISTFILES=Makefile abuild abuild.conf APKBUILD.proto

prefix ?= /usr
sysconfdir ?= /etc

P=$(PACKAGE)-$(VERSION)

help:
	@echo "$(P) makefile"
	@echo "usage: make install [ DESTDIR=<path> ]"
	@echo "       make dist"

install: abuild abuild.conf APKBUILD.proto
	mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
		$(DESTDIR)/$(prefix)/share/abuild
	cp abuild $(DESTDIR)/$(prefix)/bin/
	cp abuild.conf $(DESTDIR)/$(sysconfdir)/
	cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild

dist:	$(P).tar.gz

$(P).tar.gz:	$(DISTFILES)
	rm -rf $(P)
	mkdir -p $(P)
	cp $(DISTFILES) $(P)/
	tar -czf $@ $(P)
	rm -rf $(P)

.PHONY: install dist