mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-27 01:12:08 +00:00
35 lines
824 B
Makefile
35 lines
824 B
Makefile
|
|
PACKAGE=abuild
|
|
VERSION:=$(shell awk -F= '$$1 == "abuild_ver" {print $$2}' abuild)
|
|
DISTFILES=Makefile abuild abuild.conf APKBUILD.proto buildrepo
|
|
|
|
prefix ?= /usr
|
|
sysconfdir ?= /etc
|
|
datadir ?= $(prefix)/share/$(PACKAGE)
|
|
|
|
P=$(PACKAGE)-$(VERSION)
|
|
|
|
help:
|
|
@echo "$(P) makefile"
|
|
@echo "usage: make install [ DESTDIR=<path> ]"
|
|
@echo " make dist"
|
|
|
|
install: abuild abuild.conf APKBUILD.proto functions.sh
|
|
mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
|
|
$(DESTDIR)/$(datadir)
|
|
cp abuild buildrepo $(DESTDIR)/$(prefix)/bin/
|
|
cp abuild.conf $(DESTDIR)/$(sysconfdir)/
|
|
cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild
|
|
cp functions.sh $(DESTDIR)/$(datadir)/
|
|
|
|
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
|