Simplified a lot

master
Darks 2 years ago
parent 28528f1778
commit d11de45e51
Signed by: Darks
GPG Key ID: 7515644268BE1433
  1. 20
      Makefile

@ -2,21 +2,17 @@ PREFIX ?= $(HOME)/.local
DESTDIR ?= ""
VERSION = 1.1
bindir = $(PREFIX)/bin
libdir = $(PREFIX)/lib
sharedir = $(PREFIX)/share
install: $(bin)
install -d $(DESTDIR)$(bindir)
sed -e 's*%PREFIX%*$(PREFIX)*; s*%VERSION%*$(VERSION)*' giteapc.py > $(DESTDIR)$(bindir)/giteapc
chmod +x $(DESTDIR)$(bindir)/giteapc
install -d $(DESTDIR)$(libdir)/giteapc/giteapc
install giteapc/*.py $(DESTDIR)$(libdir)/giteapc/giteapc
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)$(bindir)/giteapc
rm -rf $(PREFIX)$(libdir)/giteapc
rmdir $(PREFIX)$(sharedir)/giteapc 2>/dev/null || true
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

Loading…
Cancel
Save