2021-01-02 13:30:24 +01:00
|
|
|
PREFIX ?= $(HOME)/.local
|
2021-03-06 13:56:39 +01:00
|
|
|
DESTDIR ?= ""
|
|
|
|
VERSION = 1.1
|
2021-01-02 13:30:24 +01:00
|
|
|
|
|
|
|
install: $(bin)
|
2021-03-06 13:56:39 +01:00
|
|
|
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
|
2021-01-02 13:30:24 +01:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(PREFIX)/bin/giteapc
|
|
|
|
rm -rf $(PREFIX)/lib/giteapc
|
2021-01-30 22:04:26 +01:00
|
|
|
rmdir $(PREFIX)/share/giteapc 2>/dev/null || true
|
2021-01-02 13:30:24 +01:00
|
|
|
@ echo "note: repositories cloned by GiteaPC have not been removed"
|
|
|
|
|
|
|
|
.PHONY: install uninstall
|