Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif

# The list of packages to be built. The order matters.
# wolfictl determines the list and order
PKG_FULL_LIST ?= $(shell $(WOLFICTL) text --dir . --type name-version)
PKGLIST ?= $(shell $(WOLFICTL) text --dir . --type name)

all: ${KEY} .build-packages

Expand All @@ -46,25 +46,21 @@ clean:

.PHONY: list list-yaml
list:
$(eval PKGLIST ?= $(shell $(WOLFICTL) text --dir . --type name))
$(info $(PKGLIST))
@printf ''

list-yaml:
$(eval PKGLIST ?= $(shell $(WOLFICTL) text --dir . --type name))
$(info $(addsuffix .yaml,$(PKGLIST)))
@printf ''

.build-packages: $(addsuffix .apk,$(addprefix packages/$(ARCH)/,${PKG_FULL_LIST}))
.build-packages: $(addprefix package/,${PKGLIST})

package/%:
$(eval yamlfile := $*.yaml)
$(eval pkgver := $(shell $(MELANGE) package-version $(yamlfile)))
$(MAKE) packages/$(ARCH)/$(pkgver).apk
$(MAKE) yamlfile=$(yamlfile) pkgname=$* packages/$(ARCH)/$(pkgver).apk

packages/$(ARCH)/%.apk: $(KEY)
$(eval pkgname := $(word 1, $(subst -, , $*)))
$(eval yamlfile := $(pkgname).yaml)
@mkdir -p ./$(pkgname)/
$(eval SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct --follow $(yamlfile)))
@SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) $(MELANGE) build $(yamlfile) $(MELANGE_OPTS) --source-dir ./$(pkgname)/ --log-policy builtin:stderr,$(TARGETDIR)/buildlogs/$*.log
Expand Down