forked from flathub/io.github.vemonet.EmojiMart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 1.52 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
OS := $(shell uname)
.PHONY: install sources flatpak bundle clean
install:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub -y org.flatpak.Builder org.gnome.Platform//44 \
org.gnome.Sdk//44 \
runtime/org.freedesktop.Sdk.Extension.rust-stable/x86_64/22.08 \
runtime/org.freedesktop.Sdk.Extension.node16/x86_64/22.08
wget -N https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py
pipx install "git+https://github.com/flatpak/flatpak-builder-tools.git#egg=flatpak_node_generator&subdirectory=node"
# org.freedesktop.Sdk.Extension.rust-nightly/x86_64/22.08
sources:
python flatpak-cargo-generator.py -o cargo-sources.json ../EmojiMart/src-tauri/Cargo.lock
flatpak-node-generator -r -o node-sources.json yarn ../EmojiMart/yarn.lock
# Gen from Yarn not working: flatpak-node-generator --no-requests-cache -r -o node-sources.json yarn ../EmojiMart/yarn.lock
flatpak:
flatpak-builder --keep-build-dirs --user --install --force-clean build io.github.vemonet.EmojiMart.yml --repo=.repo
# flatpak run io.github.vemonet.EmojiMart --keep
bundle:
flatpak build-bundle .repo io.github.vemonet.EmojiMart.flatpak io.github.vemonet.EmojiMart
bundle-ydotool:
sed -i "s/- --device=dri/- --device=all/g" ./io.github.vemonet.EmojiMart.yml
make flatpak
make bundle
sed -i "s/- --device=all/- --device=dri/g" ./io.github.vemonet.EmojiMart.yml
clean:
rm -rf .flatpak-builder build/
# flatpak remove io.github.vemonet.EmojiMart -y --delete-data