view mail-client/alpine/alpine-1.10.ebuild @ 55:11f27faa9896

revbump to 1.4.0
author holger@hoho.dyndns.org
date Tue, 29 Jul 2008 18:56:27 +0200
parents 7985ba427c7d
children
line wrap: on
line source

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils 

DESCRIPTION="alternativly licensed pine with full UTF-8 support"
HOMEPAGE="http://www.washington.edu/alpine/
	  http://staff.washington.edu/chappa/alpine/"
SRC_URI="ftp://ftp.cac.washington.edu/alpine/${P}.tar.bz2
	 chappa? ( http://staff.washington.edu/chappa/alpine/patches/${P}/all.patch.gz )"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~x86-fbsd"
IUSE="chappa doc kerberos ldap nls spell ssl threads userland_BSD onlyalpine passfile"

DEPEND="virtual/pam
	>=sys-libs/ncurses-5.1
	ssl? ( dev-libs/openssl )
	ldap? ( net-nds/openldap )
	kerberos? ( app-crypt/mit-krb5 )
	spell? ( app-text/aspell )"
RDEPEND="${DEPEND}
	app-misc/mime-types
	!onlyalpine? ( !app-editors/pico )
	!onlyalpine? ( !mail-client/pine )
	!<=net-mail/uw-imap-2004g"

maildir_warn() {
		einfo
		einfo "This build of alpine has Maildir support built in as"
		einfo "part of the chappa-all patch."
		einfo
		einfo "If you have a maildir at ~/Maildir it will be your"
		einfo "default INBOX. The path may be changed with the"
		einfo "\"maildir-location\" setting in alpine."
		einfo
		einfo "To use /var/spool/mail INBOX again, set"
		einfo "\"disable-these-drivers=md\" in your .pinerc file."
		einfo
		einfo "Alternately, you might want to read following webpage, which explains how to"
		einfo "use multiple mailboxes simultaneously:"
		einfo
		einfo "http://www.math.washington.edu/~chappa/pine/pine-info/collections/incoming-folders/"
		einfo
}

pkg_setup() {
	if use chappa; then
		maildir_warn
	fi
}

src_unpack() {
	unpack ${A}
	if use chappa; then
		epatch ${WORKDIR}/all.patch
	fi
}

src_compile() {
	local myconf="--without-tcl --with-system-pinerc=/etc/pine.conf --with-system-fixed-pinerc=/etc/pine.conf.fixed"
	if use ssl; then
		myconf="${myconf} --with-ssl-certs-dir=/etc/ssl/certs"
	else
		myconf="${myconf} --without-ssl"
	fi
	if use ldap; then
		myconf="${myconf}"
	else
		myconf="${myconf} --without-ldap"
	fi
	if user passfile; then
		myconf="${myconf} --with-passfile=.pinepwd"
	fi
	if use kerberos; then
		myconf="${myconf}"
	else
		myconf="${myconf} --without-krb5"
	fi
	if use threads; then
		myconf="${myconf}"
	else
		myconf="${myconf} --without-pthread"
	fi
	if use spell; then
		myconf="${myconf} --with-interactive-spellcheck=/usr/bin/aspell"
	fi
	if ! use nls; then
		myconf="${myconf} --disable-nls"
	fi
	econf ${myconf} || die "configure problem"
	if use userland_BSD; then
		make
	else
		emake
	fi
}

src_install() {
	if use onlyalpine; then
		dobin alpine/alpine
		doman doc/alpine.1
	else
		if use userland_BSD; then
			make DESTDIR=${D} install
		else	
			emake DESTDIR=${D} install
		fi

		doman doc/rpdump.1 doc/rpload.1 
	fi

	dodoc NOTICE
	if use chappa; then
		dodoc README.maildir
	fi
	
	if use doc; then
		dodoc README doc/brochure.txt doc/tech-notes.txt
		docinto imap
		dodoc imap/docs/*.txt imap/docs/CONFIG imap/docs/RELNOTES

		docinto imap/rfc
		dodoc imap/docs/rfc/*.txt

		docinto html/tech-notes
		dohtml -r doc/tech-notes/
	fi
}

pkg_postinst() {
	elog
	if use spell; then
		elog "In order to use spell checking"
		elog "  emerge app-dicts/aspell-\<your_langs\>"
		elog "and setup alpine with:"
		elog "  Speller = /usr/bin/aspell -c"
		elog
	fi
}