File indexing completed on 2024-12-22 04:30:07

0001 ARCH ?= $(shell flatpak --default-arch)
0002 REPO ?= repo
0003 FB_ARGS ?= "--user"
0004 TMP ?= app
0005 INSTALL_SOURCE ?= "--install-deps-from=kde-runtime-nightly"
0006 
0007 build: remotes
0008         flatpak-builder $(INSTALL_SOURCE) $(FB_ARGS) --arch=$(ARCH) --force-clean --require-changes --ccache --repo=$(REPO) --subject="build of org.kde.xdg-portal-test-kde, `date` (`git rev-parse HEAD`)" ${EXPORT_ARGS} $(TMP) org.kde.xdg-portal-test-kde.json
0009 
0010 export:
0011         flatpak build-update-repo $(REPO) ${EXPORT_ARGS} --generate-static-deltas
0012 
0013 $(REPO)/config:
0014         ostree init --mode=archive-z2 --repo=$(REPO)
0015 
0016 remotes:
0017         flatpak --user remote-add $(ARGS) --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
0018         flatpak --user remote-add $(ARGS) --if-not-exists kde-runtime-nightly https://cdn.kde.org/flatpak/kde-runtime-nightly/kde-runtime-nightly.flatpakrepo
0019 
0020 check:
0021         json-glib-validate *.json
0022 
0023 %.clean: %.json
0024         json-glib-validate $<
0025         flatpak-builder --force-clean --arch=$(ARCH) --download-only ${EXPORT_ARGS} app $<
0026 
0027 clean:
0028         rm -rf $(TMP) .flatpak-builder
0029 
0030 run:
0031         flatpak-builder --run $(TMP) org.kde.xdg-portal-test-kde.json xdg-portal-test-kde