mutt-wizard

Autoconfigure a terminal email setup with mutt and offline mail
Log | Files | Refs | README | LICENSE

Makefile (1301B)


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