|
@@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
OS = $(shell uname -s) |
|
|
OS = $(shell uname -s) |
|
|
ifndef PREFIX |
|
|
ifndef PREFIX |
|
|
PREFIX = /usr/local |
|
|
|
|
|
|
|
|
PREFIX = /usr |
|
|
endif |
|
|
endif |
|
|
ifndef MANPREFIX |
|
|
ifndef MANPREFIX |
|
|
MANPREFIX = $(PREFIX)/share/man |
|
|
MANPREFIX = $(PREFIX)/share/man |
|
@@ -11,31 +11,31 @@ endif |
|
|
install: |
|
|
install: |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
cp -f bin/mw bin/mailsync $(DESTDIR)$(PREFIX)/bin/ |
|
|
|
|
|
|
|
|
cp -f bin/mutt-wizard bin/mailsync $(DESTDIR)$(PREFIX)/bin/ |
|
|
cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile |
|
|
|
|
|
|
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/mutt-wizard $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
cp -f share/mailcap share/domains.csv share/mutt-wizard.muttrc share/switch.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
|
|
|
chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap $(DESTDIR)$(PREFIX)/share/mutt-wizard/domains.csv $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard/switch.muttrc |
|
|
|
|
|
|
|
|
cp -f share/mailcap share/domains.csv share/mutt-wizard.muttrc share/switch.muttrc share/colors-gruvbox-shuber.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
|
|
|
chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap $(DESTDIR)$(PREFIX)/share/mutt-wizard/domains.csv $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard/switch.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard/colors-gruvbox-shuber.muttrc |
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 |
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 |
|
|
cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 |
|
|
|
|
|
|
|
|
cp -f mutt-wizard.1 $(DESTDIR)$(MANPREFIX)/man1/mutt-wizard.1 |
|
|
cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
|
|
|
|
|
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mutt-wizard.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
if [ "$(PREFIX)" ]; then \ |
|
|
if [ "$(PREFIX)" ]; then \ |
|
|
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \ |
|
|
|
|
|
|
|
|
sed -iba 's:/usr:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \ |
|
|
rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \ |
|
|
rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \ |
|
|
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \ |
|
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/mwba; \ |
|
|
|
|
|
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mw.1; \ |
|
|
|
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1ba; \ |
|
|
|
|
|
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap; \ |
|
|
|
|
|
|
|
|
sed -iba 's:/usr:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mutt-wizard; \ |
|
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/mutt-wizardba; \ |
|
|
|
|
|
sed -iba 's:/usr:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mutt-wizard.1; \ |
|
|
|
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/mutt-wizard.1ba; \ |
|
|
|
|
|
sed -iba 's:/usr:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap; \ |
|
|
rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcapba; \ |
|
|
rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcapba; \ |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
uninstall: |
|
|
uninstall: |
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile |
|
|
|
|
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/mutt-wizard $(DESTDIR)$(PREFIX)/bin/mailsync |
|
|
rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
|
|
|
|
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/mutt-wizard.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
|
|
|
|
|
|
.PHONY: install uninstall |
|
|
.PHONY: install uninstall |