diff --git a/Makefile b/Makefile index 6060836..ea4bee1 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,32 @@ REPO=repo ARCH?=$(shell flatpak --default-arch) INSTALL_SOURCE?=--install-deps-from=flathub all: $(REPO)/config $(foreach file, $(wildcard org.*.*.json), $(subst .json,.app,$(file))) $(foreach file, $(wildcard org.*.*.remoteapp), $(subst .remoteapp,.app,$(file))) %.app: %.json - flatpak-builder $(INSTALL_SOURCE) --force-clean --arch=$(ARCH) --ccache --repo=$(REPO) --subject="Build of $<, `date`" ${EXPORT_ARGS} app $< + flatpak-builder $(INSTALL_SOURCE) --force-clean --arch=$(ARCH) --ccache --repo=$(REPO) --subject="Build of $<, `date`" ${ARGS} ${EXPORT_ARGS} app $< %.app: %.remoteapp ./build.sh $< %.flatpak: %.app flatpak build-bundle ${REPO} $@ $* export: flatpak build-update-repo --prune --prune-depth=20 --generate-static-deltas $(REPO) ${EXPORT_ARGS} $(REPO)/config: ostree init --mode=archive-z2 --repo=$(REPO) remotes: - flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo $(EXPORT_ARGS) + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo $(ARGS) check: $(REPO)/config $(foreach file, $(wildcard *.*.*.json), $(subst .json,.clean,$(file))) %.clean: %.json json-glib-validate $< - flatpak-builder --force-clean --arch=$(ARCH) --download-only ${EXPORT_ARGS} app $< + flatpak-builder --force-clean --arch=$(ARCH) --download-only ${ARGS} app $< clean: rm -rf $(TMP) .flatpak-builder diff --git a/build.sh b/build.sh index 9fdd90d..bcf0acd 100755 --- a/build.sh +++ b/build.sh @@ -1,24 +1,24 @@ #!/bin/bash FILE=$1 shift ID= JSON= GITURL= GITBRANCH=master . ./$FILE if [ x$ID == x ]; then echo invalid app exit 1 fi GIT_ARGS="" if [ x$GITURL != x ]; then GIT_ARGS="--from-git=$GITURL --from-git-branch=$GITBRANCH" fi -flatpak-builder --force-clean --ccache --require-changes --repo=repo --subject="Build of ${ID}, `date`" ${EXPORT_ARGS-} ${GIT_ARGS-} "$@" app $JSON +flatpak-builder --force-clean --ccache --require-changes --repo=repo --subject="Build of ${ID}, `date`" ${EXPORT_ARGS-} ${GIT_ARGS-} ${ARGS} "$@" app $JSON