This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
43 lines (34 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Override the arch with `make ARCH=i386`
ARCH ?= $(shell flatpak --default-arch)
REPO ?= repo
REPO_NAME ?= local-endless-electron-apps
FLATPAKS = \
io.atom.electron.BaseApp \
io.atom.electron.DevApp \
com.endlessm.ElectronKnowledgeBaseApp \
com.endlessm.ElectronKnowledgeDevApp \
$(NULL)
all: $(FLATPAKS)
.PHONY: $(FLATPAKS)
$(FLATPAKS): %: %.json ${REPO}
flatpak-builder --force-clean --ccache --require-changes --repo=${REPO} --arch=${ARCH} \
--subject="build of $@, `date`" \
${EXPORT_ARGS} $@ $< && \
flatpak install --user ${REPO_NAME} $@/${ARCH}/ || true && \
flatpak --user update $@/${ARCH}/
io.atom.electron.DevApp: io.atom.electron.BaseApp
com.endlessm.ElectronKnowledgeBaseApp: io.atom.electron.BaseApp
com.endlessm.ElectronKnowledgeDevApp: io.atom.electron.DevApp
${REPO}:
ostree init --mode=archive-z2 --repo=${REPO} && \
flatpak --user remote-add --if-not-exists --no-gpg-verify ${REPO_NAME} ${REPO}
# Convenience to install dependencies
install-deps:
if ! flatpak info --show-commit org.freedesktop.Platform/${ARCH}/1.6; then \
flatpak --user remote-add --if-not-exists --from gnome https://sdk.gnome.org/gnome.flatpakrepo && \
flatpak --user install gnome org.freedesktop.Platform/${ARCH}/1.6; \
fi && \
if ! flatpak info --show-commit org.freedesktop.Sdk/${ARCH}/1.6; then \
flatpak --user remote-add --if-not-exists --from gnome https://sdk.gnome.org/gnome.flatpakrepo && \
flatpak --user install gnome org.freedesktop.Sdk/${ARCH}/1.6; \
fi