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.
 
 
 
 

37 lines
1.8 KiB

  1. .POSIX:
  2. PREFIX = /usr/local
  3. MANPREFIX = $(PREFIX)/share/man
  4. install:
  5. mkdir -p $(DESTDIR)$(PREFIX)/bin
  6. mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  7. mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
  8. cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin
  9. cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  10. chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard
  11. for shared in share/*; do \
  12. cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
  13. chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \
  14. done
  15. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  16. cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  17. sed 's:/usr/local:$(PREFIX):' < share/mutt-wizard.muttrc > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc
  18. sed 's:/usr/local:$(PREFIX):' < share/mailcap > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap
  19. sed 's:/usr/local:$(PREFIX):' < bin/mw > $(DESTDIR)$(PREFIX)/bin/mw
  20. sed 's:/usr/local:$(PREFIX):' < mw.1 > $(DESTDIR)$(MANPREFIX)/man1/mw.1
  21. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  22. chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile
  23. mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/
  24. chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/
  25. cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  26. chmod 644 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  27. uninstall:
  28. rm -f $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile
  29. rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  30. rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  31. rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  32. .PHONY: install uninstall