aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0f6087d..e0533ff 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,9 @@ target = $(shell rustc -vV | grep host | awk '{print $$2}')
architectures := x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
app_name := map
deploy_host := deploy@build.r.bdr.sh
-deploy_path := /srv/http/build.r.bdr.sh/$(app_name)
+deploy_path := /srv/http/build.r.bdr.sh/$(app_name)-linux
install_path := /usr/local/bin/$(app_name)
+flatpak_cargo_generator := $(HOME)/projects/vendor/flatpak-builder-tools/cargo
define sign_and_deploy
@./scripts/sign.sh "$(1)" "$(channel)" "$(architecture)"
@@ -24,7 +25,7 @@ endif
# Build ########################################################################
-build: prepare
+build: compile_translations prepare
@$(eval target_dir := ./target/$(target)/$(profile)/map)
cargo build --profile $(profile) --target $(target)
@@ -66,7 +67,10 @@ package: $(architectures)
release: rpm tar deb
@$(eval filename := $(app_name)-$(target)-$(channel))
-flatpak:
+update_flatpak_dependencies:
+ cd $(flatpak_cargo_generator) && `poetry env activate` && python3 flatpak-cargo-generator.py $(CURDIR)/Cargo.lock -o $(CURDIR)/build-aux/cargo-sources.json && deactivate
+
+flatpak: update_flatpak_dependencies
@flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir ./build-aux/systems.tranquil.Map.yml
deb: build
@@ -112,4 +116,4 @@ else
endif
-.PHONY: default build $(architectures) rpm package prepare set_rust ci release test coverage format flatpak extract_strings find_translatable_files compile_translations
+.PHONY: default build $(architectures) rpm package prepare set_rust ci release test coverage format flatpak update_flatpak_dependencies extract_strings find_translatable_files compile_translations