You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
894 B

  1. .POSIX:
  2. OS = $(shell uname -s)
  3. ifeq ($(OS), Darwin)
  4. PREFIX = /usr/local
  5. else
  6. PREFIX = /usr
  7. endif
  8. MANPREFIX = $(PREFIX)/share/man
  9. install:
  10. mkdir -p $(DESTDIR)$(PREFIX)/bin
  11. for script in bin/*; do \
  12. cp -f $$script $(DESTDIR)$(PREFIX)/bin/; \
  13. chmod 755 $(DESTDIR)$(PREFIX)/$$script; \
  14. done
  15. mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
  16. for shared in share/*; do \
  17. cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
  18. done
  19. if [[ "$(OS)" == "Darwin" ]]; then \
  20. sed -iba 's/\/usr\//\/usr\/local\//' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \
  21. rm $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \
  22. fi
  23. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  24. cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
  25. uninstall:
  26. for script in bin/*; do \
  27. rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \
  28. done
  29. rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard
  30. .PHONY: install uninstall