abuild/Makefile

35 lines
824 B
Makefile
Raw Normal View History

2008-10-18 08:09:24 +00:00
PACKAGE=abuild
VERSION:=$(shell awk -F= '$$1 == "abuild_ver" {print $$2}' abuild)
DISTFILES=Makefile abuild abuild.conf APKBUILD.proto buildrepo
2008-10-18 08:09:24 +00:00
prefix ?= /usr
sysconfdir ?= /etc
2009-01-03 10:05:12 +00:00
datadir ?= $(prefix)/share/$(PACKAGE)
2008-10-18 08:09:24 +00:00
P=$(PACKAGE)-$(VERSION)
help:
@echo "$(P) makefile"
@echo "usage: make install [ DESTDIR=<path> ]"
@echo " make dist"
2009-01-03 10:05:12 +00:00
install: abuild abuild.conf APKBUILD.proto functions.sh
2008-10-30 15:55:25 +00:00
mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
2009-01-03 10:05:12 +00:00
$(DESTDIR)/$(datadir)
cp abuild buildrepo $(DESTDIR)/$(prefix)/bin/
2008-10-18 08:09:24 +00:00
cp abuild.conf $(DESTDIR)/$(sysconfdir)/
2008-10-30 15:55:25 +00:00
cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild
2009-01-03 10:05:12 +00:00
cp functions.sh $(DESTDIR)/$(datadir)/
2008-10-18 08:09:24 +00:00
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