42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
PROJECT = $(shell basename $(CURDIR))
|
|
GITHASH = $(shell git rev-parse --short HEAD)
|
|
|
|
PROJ_NAME = iced-demo
|
|
|
|
debug:
|
|
cargo run
|
|
|
|
build:
|
|
cargo build --release
|
|
ls -lh target/release/$(PROJECT)
|
|
|
|
release: build
|
|
tar -czf $(PROJECT)_$(GITHASH).tar.gz -C target/release $(PROJECT)
|
|
tar -tvf $(PROJECT)_$(GITHASH).tar.gz
|
|
|
|
clean:
|
|
cargo clean
|
|
rm -f *.tar.gz
|
|
rm -f *.tar.gz.minisig
|
|
|
|
source-release:
|
|
git archive --format=tar.gz --prefix=$(PROJECT)/ -o $(PROJECT)_$(GITHASH)_source.tar.gz HEAD
|
|
tar -tvf $(PROJECT)_$(GITHASH)_source.tar.gz
|
|
|
|
sign: release source-release
|
|
minisign -Sm $(PROJECT)_$(GITHASH).tar.gz $(PROJECT)_$(GITHASH)_source.tar.gz
|
|
|
|
publish: sign
|
|
scp $(PROJECT)_$(GITHASH).tar.gz* $(PROJECT)_$(GITHASH)_source.tar.gz* server:/public/$(PROJECT)/
|
|
|
|
#cp packaging/$(PROJ_NAME).svg ~/.local/share/icons/
|
|
install: release
|
|
install -Dm755 target/release/$(PROJECT) ~/.local/bin/$(PROJ_NAME)
|
|
cp packaging/$(PROJ_NAME).desktop ~/.local/share/applications/
|
|
update-desktop-database ~/.local/share/applications/
|
|
|
|
uninstall:
|
|
rm -f ~/.local/bin/$(PROJ_NAME)
|
|
rm -f ~/.local/share/applications/$(PROJ_NAME).desktop
|
|
rm -f ~/.local/share/icons/$(PROJ_NAME).svg
|
|
update-desktop-database ~/.local/share/applications/
|