aboutsummaryrefslogtreecommitdiffstats
path: root/mail/enigmail/Makefile
blob: b8a4c1ce444f6a5fc09e5778fb80f0f5d7381816 (plain) (blame)
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
80
81
82
83
# New ports collection makefile for:    enigmail
# Date created:         20 January 2004
# Whom:             Alex Dupre <ale@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   enigmail
PORTVERSION=    0.84.0
PORTREVISION?=  0
CATEGORIES= mail security
MASTER_SITES=   http://www.brunschwig.net/enigmail/src/ \
        http://mozdev.secsup.org/enigmail/src/ \
        http://downloads.us-east3.mozdev.org/enigmail/src/ \
        http://mozdev.oregonstate.edu/enigmail/src/ \
        http://mozdev.sweetooth.org/enigmail/src/ \
        http://ftp.heanet.ie/pub/mozdev/enigmail/src/ \
        http://mirror.meisterwerk.net/rmozdev/enigmail/src/
DISTFILES=  ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
        ipc-1.0.5${EXTRACT_SUFX}

MAINTAINER= ale@FreeBSD.org
COMMENT?=   A GnuPG extension for the Mozilla mail client

EXTRACT_DEPENDS?=   ${WRKDIR}/../../../${LOCAL_SRCDIR}/work/mozilla/Makefile:${PORTSDIR}/${LOCAL_SRCDIR}:configure
RUN_DEPENDS?=   mozilla:${PORTSDIR}/${LOCAL_SRCDIR}

RUN_DEPENDS+=   gpg:${PORTSDIR}/security/gnupg

USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_REINPLACE=  yes

WRKSRC=     ${WRKDIR}/mozilla
LOCAL_SRCDIR?=  www/mozilla
LOCAL_SUBDIR?=  lib/mozilla
LOCAL_PREFIX=   ${PREFIX}/${LOCAL_SUBDIR}

COMPONENTS= ipc.xpt enigmime.xpt libenigmime.so enigmail.xpt enigmail.js enigprefs-service.js
CHROME=     enigmail.jar enigmail-skin.jar enigmail-skin-tbird.jar
PREF=       enigmail.js

PLIST_SUB=  LOCAL_SUBDIR=${LOCAL_SUBDIR}

do-extract:
    @${RM} -rf ${WRKDIR}
    @${MKDIR} ${WRKDIR}
    @${CP} -R ${WRKDIR}/../../../${LOCAL_SRCDIR}/work/mozilla ${WRKSRC}
    @for file in ${EXTRACT_ONLY}; do \
        cd ${WRKSRC}/extensions && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS}; \
    done

pre-patch:
    @${REINPLACE_CMD} -e "s|${LOCAL_SRCDIR}|mail/enigmail${PKGNAMESUFFIX}|g" \
        ${WRKSRC}/config/autoconf.mk \
        ${WRKSRC}/directory/c-sdk/config/autoconf.mk \
        ${WRKSRC}/nsprpub/config/autoconf.mk

do-build:
    @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} export)
    @(cd ${WRKSRC}/modules/libreg; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS})
    @(cd ${WRKSRC}/xpcom/string; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS})
    @(cd ${WRKSRC}/xpcom; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS})
    @(cd ${WRKSRC}/xpcom/obsolete; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS})
    @(cd ${WRKSRC}/extensions/ipc; ./makemake -r; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS});
    @(cd ${WRKSRC}/extensions/enigmail; ./makemake -r; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS});

do-install:
    @for file in ${COMPONENTS}; do \
        ${INSTALL_DATA} ${WRKSRC}/dist/bin/components/$$file ${LOCAL_PREFIX}/components; \
    done
    @for file in ${CHROME}; do \
        ${INSTALL_DATA} ${WRKSRC}/dist/bin/chrome/$$file ${LOCAL_PREFIX}/chrome; \
    done
    @for file in ${PREF}; do \
        ${INSTALL_DATA} ${WRKSRC}/dist/bin/defaults/pref/$$file ${LOCAL_PREFIX}/defaults/pref; \
    done

post-install:
    @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>