mirror of
https://git.planet-casio.com/Lephenixnoir/GiteaPC.git
synced 2024-12-26 19:43:40 +01:00
508c70fdcb
Add support for DESTDIR Co-authored-by: Darks <louis@gatin.cloud> Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/GiteaPC/pulls/2 Co-Authored-By: Darks <pc@gatin.cloud> Co-Committed-By: Darks <pc@gatin.cloud>
18 lines
582 B
Makefile
18 lines
582 B
Makefile
PREFIX ?= $(HOME)/.local
|
|
DESTDIR ?= ""
|
|
VERSION = 1.1
|
|
|
|
install: $(bin)
|
|
install -d $(DESTDIR)$(PREFIX)/bin
|
|
sed -e 's*%PREFIX%*$(PREFIX)*; s*%VERSION%*$(VERSION)*' giteapc.py > $(DESTDIR)$(PREFIX)/bin/giteapc
|
|
chmod +x $(DESTDIR)$(PREFIX)/bin/giteapc
|
|
install -d $(DESTDIR)$(PREFIX)/lib/giteapc/giteapc
|
|
install giteapc/*.py $(DESTDIR)$(PREFIX)/lib/giteapc/giteapc
|
|
|
|
uninstall:
|
|
rm -f $(PREFIX)/bin/giteapc
|
|
rm -rf $(PREFIX)/lib/giteapc
|
|
rmdir $(PREFIX)/share/giteapc 2>/dev/null || true
|
|
@ echo "note: repositories cloned by GiteaPC have not been removed"
|
|
|
|
.PHONY: install uninstall
|