| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/mail-client/claws-mail/claws-mail-3.8.1-r1.ebuild,v 1.4 2012/09/05 07:48:27 jlec Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit autotools-utils multilib gnome2-utils eutils |
| 8 |
|
| 9 |
DESCRIPTION="An email client (and news reader) based on GTK+" |
| 10 |
HOMEPAGE="http://www.claws-mail.org/" |
| 11 |
|
| 12 |
SRC_URI="mirror://sourceforge/sylpheed-claws/${P}.tar.bz2" |
| 13 |
|
| 14 |
SLOT="0" |
| 15 |
LICENSE="GPL-3" |
| 16 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
| 17 |
IUSE="bogofilter crypt dbus dillo doc +imap ipv6 ldap nntp pda session smime spamassassin spell +ssl startup-notification xface" |
| 18 |
|
| 19 |
COMMONDEPEND=">=x11-libs/gtk+-2.20:2 |
| 20 |
pda? ( >=app-pda/jpilot-0.99 ) |
| 21 |
ssl? ( >=net-libs/gnutls-2.2.0 ) |
| 22 |
ldap? ( >=net-nds/openldap-2.0.7 ) |
| 23 |
crypt? ( >=app-crypt/gpgme-0.4.5 ) |
| 24 |
dbus? ( >=dev-libs/dbus-glib-0.60 ) |
| 25 |
dillo? ( www-client/dillo ) |
| 26 |
spell? ( >=app-text/enchant-1.0.0 ) |
| 27 |
imap? ( >=net-libs/libetpan-0.57 ) |
| 28 |
nntp? ( >=net-libs/libetpan-0.57 ) |
| 29 |
startup-notification? ( x11-libs/startup-notification ) |
| 30 |
bogofilter? ( mail-filter/bogofilter ) |
| 31 |
session? ( x11-libs/libSM |
| 32 |
x11-libs/libICE ) |
| 33 |
smime? ( >=app-crypt/gpgme-0.4.5 )" |
| 34 |
|
| 35 |
DEPEND="${COMMONDEPEND} |
| 36 |
xface? ( >=media-libs/compface-1.4 ) |
| 37 |
virtual/pkgconfig" |
| 38 |
|
| 39 |
RDEPEND="${COMMONDEPEND} |
| 40 |
app-misc/mime-types |
| 41 |
x11-misc/shared-mime-info" |
| 42 |
|
| 43 |
PLUGIN_NAMES="acpi-notifier address_keeper archive att-remover attachwarner clamd fancy fetchinfo geolocation gdata gtkhtml mailmbox newmail notification perl python rssyl spam_report tnef_parse vcalendar" |
| 44 |
|
| 45 |
PATCHES=( |
| 46 |
"${FILESDIR}"/claws-mail-${PV}_fix-signature.patch |
| 47 |
) |
| 48 |
|
| 49 |
src_configure() { |
| 50 |
local myeconfargs=( |
| 51 |
$(use_enable ipv6) |
| 52 |
$(use_enable ldap) |
| 53 |
$(use_enable dbus) |
| 54 |
$(use_enable pda jpilot) |
| 55 |
$(use_enable spell enchant) |
| 56 |
$(use_enable xface compface) |
| 57 |
$(use_enable doc manual) |
| 58 |
$(use_enable startup-notification) |
| 59 |
$(use_enable session libsm) |
| 60 |
$(use_enable crypt pgpmime-plugin) |
| 61 |
$(use_enable crypt pgpinline-plugin) |
| 62 |
$(use_enable crypt pgpcore-plugin) |
| 63 |
$(use_enable dillo dillo-viewer-plugin) |
| 64 |
$(use_enable spamassassin spamassassin-plugin) |
| 65 |
$(use_enable bogofilter bogofilter-plugin) |
| 66 |
$(use_enable smime smime-plugin) |
| 67 |
--enable-trayicon-plugin |
| 68 |
--disable-maemo |
| 69 |
) |
| 70 |
|
| 71 |
# libetpan is needed if user wants nntp or imap functionality |
| 72 |
if use imap || use nntp; then |
| 73 |
myeconfargs+=( --enable-libetpan ) |
| 74 |
else |
| 75 |
myeconfargs+=( --disable-libetpan ) |
| 76 |
fi |
| 77 |
|
| 78 |
if use ssl; then |
| 79 |
myeconfargs+=( --enable-gnutls ) |
| 80 |
else |
| 81 |
myeconfargs+=( --disable-gnutls ) |
| 82 |
fi |
| 83 |
|
| 84 |
autotools-utils_src_configure |
| 85 |
} |
| 86 |
|
| 87 |
src_install() { |
| 88 |
local DOCS=( AUTHORS ChangeLog* INSTALL* NEWS README* TODO* ) |
| 89 |
autotools-utils_src_install |
| 90 |
|
| 91 |
# Makefile install claws-mail.png in /usr/share/icons/hicolor/48x48/apps |
| 92 |
# => also install it in /usr/share/pixmaps for other desktop envs |
| 93 |
# => also install higher resolution icons in /usr/share/icons/hicolor/... |
| 94 |
insinto /usr/share/pixmaps |
| 95 |
doins ${PN}.png || die |
| 96 |
local res resdir |
| 97 |
for res in 64x64 128x128 ; do |
| 98 |
resdir="/usr/share/icons/hicolor/${res}/apps" |
| 99 |
insinto ${resdir} |
| 100 |
newins ${PN}-${res}.png ${PN}.png || die |
| 101 |
done |
| 102 |
|
| 103 |
docinto tools |
| 104 |
dodoc tools/README* |
| 105 |
|
| 106 |
domenu ${PN}.desktop |
| 107 |
|
| 108 |
einfo "Installing extra tools" |
| 109 |
cd "${S}"/tools |
| 110 |
exeinto /usr/$(get_libdir)/${PN}/tools |
| 111 |
doexe *.pl *.py *.conf *.sh || die |
| 112 |
doexe tb2claws-mail update-po uudec uuooffice || die |
| 113 |
} |
| 114 |
|
| 115 |
pkg_preinst() { |
| 116 |
gnome2_icon_savelist |
| 117 |
} |
| 118 |
|
| 119 |
pkg_postinst() { |
| 120 |
gnome2_icon_cache_update |
| 121 |
|
| 122 |
UPDATE_PLUGINS="" |
| 123 |
for x in ${PLUGIN_NAMES}; do |
| 124 |
has_version mail-client/${PN}-$x && UPDATE_PLUGINS="${UPDATE_PLUGINS} $x" |
| 125 |
done |
| 126 |
if [ -n "${UPDATE_PLUGINS}" ]; then |
| 127 |
elog |
| 128 |
elog "You have to re-emerge or update the following plugins:" |
| 129 |
elog |
| 130 |
for x in ${UPDATE_PLUGINS}; do |
| 131 |
elog " mail-client/${PN}-$x" |
| 132 |
done |
| 133 |
elog |
| 134 |
fi |
| 135 |
} |
| 136 |
|
| 137 |
pkg_postrm() { |
| 138 |
gnome2_icon_cache_update |
| 139 |
} |