# $NetBSD: Makefile-thunderbird.common,v 1.7 2005/07/24 02:58:33 taya Exp $

MOZILLA_BIN=	thunderbird-bin
MOZ_VER=	1.0.6
EXTRACT_SUFX=	.tar.bz2
DISTNAME=	thunderbird-${MOZ_VER}-source
MASTER_SITES=	http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/${MOZ_VER}/source/ \
		ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/${MOZ_VER}/source/

HOMEPAGE=	http://www.mozilla.org/projects/thunderbird/

CONFIGURE_ENV+=	MOZ_THUNDERBIRD=1
MAKE_ENV+=	MOZ_THUNDERBIRD=1

DISTINFO_FILE=	${.CURDIR}/../../mail/thunderbird/distinfo
PATCHDIR=	${.CURDIR}/../../mail/thunderbird/patches

CONFIGURE_ARGS+=	--enable-extensions=wallet,spellcheck,xmlextras
CONFIGURE_ARGS+=	--enable-single-profile

pre-install:
	${CP} -r ${WRKSRC}/dist/bin/defaults/profile/extensions \
							${WRKSRC}/dist/bin
	${MV} ${WRKSRC}/dist/bin/extensions/installed-extensions.txt \
		${WRKSRC}/dist/bin/extensions/installed-extensions-processed.txt

post-install:
	cd ${PREFIX}/lib/${MOZILLA} && \
	${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. HOME=${WRKSRC} \
		./${MOZILLA_BIN} -register

.include "../../www/mozilla/Makefile.common"