36 lines
870 B
Makefile
36 lines
870 B
Makefile
# Expects to run from *within* alpine. -*- Makefile-gmake -*-
|
|
|
|
.PHONY: build sign
|
|
|
|
TARGET = $(CURDIR)/target
|
|
ARCH = $(shell apk --print-arch)
|
|
ARCH_TARGET = $(TARGET)/packages/$(ARCH)
|
|
SIGNING_KEY = $(HOME)/.abuild/$(KEYFILE)
|
|
|
|
PACKAGES = $(patsubst %,%.apk,$(file < package-list))
|
|
|
|
build: $(PACKAGES) sign
|
|
|
|
%.apk: $(ARCH_TARGET)
|
|
@echo "Building $*..."
|
|
@cd packages/$* && (unset MAKEFLAGS; abuild -F -P $(TARGET) deps && abuild -P $(TARGET))
|
|
|
|
$(ARCH_TARGET):
|
|
mkdir -p $@
|
|
|
|
%.checksum:
|
|
cd packages/$* && abuild checksum
|
|
|
|
%.buildshell:
|
|
cd packages/$* && (unset MAKEFLAGS; abuild -F -P $(TARGET) deps && bash --login)
|
|
|
|
sign: $(ARCH_TARGET)
|
|
rm -f $(ARCH_TARGET)/APKINDEX.tar.gz
|
|
cd $(ARCH_TARGET) && apk index -o APKINDEX.tar.gz --rewrite-arch $(ARCH) *.apk
|
|
abuild-sign -q -k $(SIGNING_KEY) $(ARCH_TARGET)/APKINDEX.tar.gz
|
|
|
|
clean:
|
|
|
|
veryclean: clean
|
|
rm -rf $(ARCH_TARGET)
|