aboutsummaryrefslogtreecommitdiffstats
path: root/main/mutt/APKBUILD
blob: 8d9df5b8a2d7083ecc3dd4dcdc99b5a4eb932e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Contributor: Andrew Manison<amanison@anselsystems.com>
# Maintainer:  Andrew Manison<amanison@anselsystems.com>
pkgname=mutt
pkgver=1.5.23
pkgrel=1
pkgdesc="a small but very powerful text-mode email client"
url="http://www.mutt.org"
arch="all"
license="GPL"
depends=
makedepends="cyrus-sasl-dev gdbm-dev gettext-dev gpgme-dev
	libidn-dev ncurses-dev openssl-dev perl"
install=
subpackages="$pkgname-doc $pkgname-lang"
source="https://bitbucket.org/$pkgname/$pkgname/downloads/$pkgname-$pkgver.tar.gz
	CVE-2014-9116.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	ISPELL=/usr/bin/hunspell \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-imap \
		--enable-pop \
		--enable-smtp \
		--enable-hcache \
		--enable-gpgme \
		--with-curses \
		--with-mailpath=/var/spool/mail \
		--with-docdir=/usr/share/doc/mutt \
		--without-included-gettext \
		--with-ssl \
		--with-sasl \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	
	rm "$pkgdir"/etc/*.dist \
		"$pkgdir"/etc/mime.types \
		"$pkgdir"/usr/bin/muttbug \
		"$pkgdir"/usr/bin/flea \
		|| return 1

	# fix up default config
	cat contrib/gpg.rc >> "$pkgdir"/etc/Muttrc
	grep -C 5 "^color" contrib/sample.muttrc >> "$pkgdir"/etc/Muttrc
	echo "source /etc/Muttrc.local" >> "$pkgdir"/etc/Muttrc
	echo "# Local configuration for Mutt." > "$pkgdir"/etc/Muttrc.local

}

md5sums="11f5b6a3eeba1afa1257fe93c9f26bff  mutt-1.5.23.tar.gz
6df95ec10fa73e3675dcc3b0a6372f50  CVE-2014-9116.patch"
sha256sums="3af0701e57b9e1880ed3a0dee34498a228939e854a16cdccd24e5e502626fd37  mutt-1.5.23.tar.gz
97fd773b5c58c7803c57fcd126c1c81c2c7cbb7b860f217571c6a2a47a5b01c5  CVE-2014-9116.patch"
sha512sums="f1b4a7230253651857f61bd7215cce870a613012f613d4c907d401556083726c8ed7d429d57a8bf858c3b5b23683380d4c1494540d86ca80813e22cb6b95bc1e  mutt-1.5.23.tar.gz
14aba18442da7783ec76c17699c0e3e88c4f25a21418d37b48e456f572b0b56f9197aa8d694a8bf23be313252cf76e818bc5e9d3e30f2dfe8bff14eb8f6b01e8  CVE-2014-9116.patch"