|
@@ -1,39 +1,27 @@ |
|
|
.POSIX: |
|
|
.POSIX: |
|
|
|
|
|
|
|
|
OS = $(shell uname -s) |
|
|
|
|
|
ifndef PREFIX |
|
|
|
|
|
PREFIX = /usr/local |
|
|
|
|
|
endif |
|
|
|
|
|
ifndef MANPREFIX |
|
|
|
|
|
MANPREFIX = $(PREFIX)/share/man |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
PREFIX = /usr/local |
|
|
|
|
|
MANPREFIX = $(PREFIX)/share/man |
|
|
|
|
|
|
|
|
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 lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
|
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile |
|
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
|
|
|
cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin |
|
|
|
|
|
cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard |
|
|
for shared in share/*; do \ |
|
|
for shared in share/*; do \ |
|
|
cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ |
|
|
cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ |
|
|
chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \ |
|
|
chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \ |
|
|
done |
|
|
done |
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 |
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 |
|
|
cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 |
|
|
|
|
|
cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
|
|
|
sed 's:/usr/local:$(PREFIX):' < share/mutt-wizard.muttrc > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc |
|
|
|
|
|
sed 's:/usr/local:$(PREFIX):' < share/mailcap > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap |
|
|
|
|
|
sed 's:/usr/local:$(PREFIX):' < bin/mw > $(DESTDIR)$(PREFIX)/bin/mw |
|
|
|
|
|
sed 's:/usr/local:$(PREFIX):' < mw.1 > $(DESTDIR)$(MANPREFIX)/man1/mw.1 |
|
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 |
|
|
if [ "$(PREFIX)" ]; then \ |
|
|
|
|
|
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \ |
|
|
|
|
|
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; \ |
|
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcapba; \ |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ |
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ |
|
|
chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ |
|
|
cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh |
|
|
cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh |
|
|