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.
 
 
 
 

41 regels
1.3 KiB

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