Makefile 669 Bytes
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2 3

PACKAGE=abuild
VERSION=0.3
Natanael Copa's avatar
Natanael Copa committed
4
DISTFILES=Makefile abuild abuild.conf APKBUILD.proto
Natanael Copa's avatar
Natanael Copa committed
5 6 7 8 9 10 11 12 13 14 15

prefix ?= /usr
sysconfdir ?= /etc

P=$(PACKAGE)-$(VERSION)

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

Natanael Copa's avatar
Natanael Copa committed
16 17 18
install: abuild abuild.conf APKBUILD.proto
	mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
		$(DESTDIR)/$(prefix)/share/abuild
Natanael Copa's avatar
Natanael Copa committed
19 20
	cp abuild $(DESTDIR)/$(prefix)/bin/
	cp abuild.conf $(DESTDIR)/$(sysconfdir)/
Natanael Copa's avatar
Natanael Copa committed
21
	cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild
Natanael Copa's avatar
Natanael Copa committed
22 23 24 25 26 27 28 29 30 31 32

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