mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 15:02:59 +00:00
5baad961c6
This script helps developers who works on the alpine subprojects (i.e apk-tools, alpine-baselayout etc) to build a development alpine iso. a new alpine iso using the un-committed local sub
41 lines
1010 B
Makefile
41 lines
1010 B
Makefile
|
|
PACKAGE=abuild
|
|
VERSION:=$(shell awk -F= '$$1 == "abuild_ver" {print $$2}' abuild)
|
|
USR_BIN_FILES=abuild devbuild mkalpine buildrepo
|
|
DISTFILES=$(USR_BIN_FILES) Makefile abuild.conf APKBUILD.proto
|
|
|
|
|
|
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: $(USR_BIN_FILES) abuild.conf APKBUILD.proto functions.sh
|
|
mkdir -p $(DESTDIR)/$(prefix)/bin $(DESTDIR)/$(sysconfdir) \
|
|
$(DESTDIR)/$(datadir)
|
|
for i in $(USR_BIN_FILES); do\
|
|
install -m 755 $$i $(DESTDIR)/$(prefix)/bin/$$i;\
|
|
done
|
|
if [ -z "$(DESTDIR)" ] && [ ! -f "/$(sysconfdir)"/abuild.conf ]; then\
|
|
cp abuild.conf $(DESTDIR)/$(sysconfdir)/; \
|
|
fi
|
|
cp APKBUILD.proto $(DESTDIR)/$(prefix)/share/abuild
|
|
cp functions.sh $(DESTDIR)/$(datadir)/
|
|
|
|
dist: $(P).tar.bz2
|
|
|
|
$(P).tar.bz2: $(DISTFILES)
|
|
rm -rf $(P)
|
|
mkdir -p $(P)
|
|
cp $(DISTFILES) $(P)/
|
|
tar -cjf $@ $(P)
|
|
rm -rf $(P)
|
|
|
|
.PHONY: install dist
|