-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
63 lines (45 loc) · 1.32 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# To update the version, run:
#
# make update VERSION=a.b.c
#
ID := org.gaphor.Gaphor
# Do not change version by hand!
VERSION := 2.26.0
BUILD := build
DIST := dist
REPO := $(BUILD)/repo
all: dist
dist: $(DIST)/$(ID).flatpak
update: clean version appdata
$(MAKE) clean all
only-update: clean version appdata gaphor-bin.yaml
version:
sed -i "s/^VERSION .*/VERSION := ${VERSION}/" Makefile
appdata:
python3 update-appdata.py $(VERSION)
gaphor-bin.yaml: depends.sh
bash depends.sh ${VERSION} > gaphor-bin.yaml
$(DIST)/$(ID).flatpak: $(REPO)
mkdir -p dist
flatpak build-bundle $(REPO) $@ $(ID)
$(REPO): gaphor-bin.yaml graphviz.yaml org.gaphor.Gaphor.yaml
flatpak-builder --force-clean --repo=$@ $(BUILD)/build $(ID).yaml
flatpak build-update-repo $(REPO)
clean:
rm -f gaphor-bin.yaml
rm -rf $(BUILD)
rm -rf $(DIST)
rm -rf .flatpak-builder
# for local testing:
setup:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Sdk//46
flatpak install flathub org.gnome.Platform//46
install: $(DIST)/$(ID).flatpak
flatpak install --user --reinstall $(DIST)/$(ID).flatpak
run:
flatpak run org.gaphor.Gaphor//master
uninstall:
flatpak uninstall org.gaphor.Gaphor//master
.PHONY: all dist update only-update version appdata clean setup install run uninstall