mail/neomutt/neomutt.sh

Tue, 23 Jul 2019 21:10:00 +0200

author
David Demelier <markand@malikania.fr>
date
Tue, 23 Jul 2019 21:10:00 +0200
changeset 622
e04beece0bd7
child 657
b0fd9c97761e
permissions
-rwxr-xr-x

mail/neomutt: initial import, closes #1698

622
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 #!/bin/sh
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=neomutt
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=20180716
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="GPLv2+"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="mutt fork with more features"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="https://github.com/neomutt/neomutt/archive/$PKGNAME-$PKGVERSION.tar.gz"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 PKGDEPENDS="dev/gettext:build lang/tcl:build lib/ncurses text/libxslt:build www/w3m:build"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 PKGOPTIONS="IDN2 NLS NOTMUCH SSL"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 PKGPROTECT="etc/neomuttrc"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
27
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CHOST:=$(uname -m)-linux-musl}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${CBUILD:=$(uname -m)-linux-musl}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${CC:=clang}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 : ${CFLAGS:=-O2}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 : ${LDFLAGS:=}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 : ${IDN2:=yes} # TODO: not upstream default, change once dns/libidn is available.
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 : ${NLS:=yes}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 : ${NOTMUCH:=no}
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 : ${SSL:=openssl} # openssl or gnutls
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 if [ "$IDN2" = "yes" ]; then
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 PKGDEPENDS="dns/libidn2 $PKGDEPENDS"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 with_idn2="--disable-idn --idn2"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 fi
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
42
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 if [ "$NLS" != "yes" ]; then
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 with_nls="--disable-nls"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 fi
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
46
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 if [ "$NOTMUCH" = "yes" ]; then
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 with_notmuch="--notmuch"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 fi
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
50
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 if [ "$SSL" = "openssl" ]; then
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 PKGDEPENDS="crypto/libressl $PKGDEPENDS"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 with_ssl="--ssl"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 elif [ "$SSL" = "gnutls" ]; then
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 PKGDEPENDS="crypto/gnutls $PKGDEPENDS"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 with_ssl="--gnutls"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 fi
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
58
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 build()
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
60 {
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 rm -rf $PKGNAME-$PKGVERSION
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 tar xvf $PKGNAME-$PKGVERSION.tar.gz
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 cd $PKGNAME-$PKGNAME-$PKGVERSION
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
64
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
65 #--build=$CBUILD \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 #--host=$CHOST \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
67 ./configure \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
68 --prefix= \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
69 $with_idn2 \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
70 $with_nls \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
71 $with_notmuch \
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
72 $with_ssl
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
73 make CC="$CC" EXTRA_CFLAGS="$CFLAGS" EXTRA_LDFLAGS="$LDFLAGS"
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
74 make install DESTDIR=$DESTDIR
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
75
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
76 cd ..
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
77 rm -rf $PKGNAME-$PKGNAME-$PKGVERSION
e04beece0bd7 mail/neomutt: initial import, closes #1698
David Demelier <markand@malikania.fr>
parents:
diff changeset
78 }

mercurial