aboutsummaryrefslogtreecommitdiffstats
path: root/mail/enigmail/Makefile
blob: 84f716e66ff007afbd40d71501722e4a8609e3a1 (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
84
# New ports collection makefile for:    enigmail
# Date created:         20 January 2004
# Whom:             Alex Dupre <ale@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   enigmail
PORTVERSION?=   1.0.1
CATEGORIES= mail security
MASTER_SITES=   http://www.mozilla-enigmail.org/download/source/
PKGNAMEPREFIX=  ${GECKO}-

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

EXTRACT_DEPENDS+=   ${NONEXISTENT}:${PORTSDIR}/${GECKO_PORTDIR}:configure \
        ${GECKO:C/[0-9]//}:${PORTSDIR}/${GECKO_PORTDIR} \
        gmake:${PORTSDIR}/devel/gmake \
        intltool-extract:${PORTSDIR}/textproc/intltool \
        ${LOCALBASE}/libdata/pkgconfig/printproto.pc:${PORTSDIR}/x11/printproto
BUILD_DEPENDS=  ${GECKO:C/[0-9]//}:${PORTSDIR}/${GECKO_PORTDIR}
RUN_DEPENDS=    ${GECKO:C/[0-9]//}:${PORTSDIR}/${GECKO_PORTDIR} \
        gpg:${PORTSDIR}/security/gnupg

.if !defined(GECKO)
GECKO=      mozilla
GECKO_PORTDIR=  www/${GECKO}
IGNORE=     is not available anymore for Mozilla: use one of the slave ports
.endif

.if defined(GECKO_EXTDIR)
GECKO_WRKSRC=   ${WRKDIR}/../../../${GECKO_PORTDIR}/work/${GECKO_EXTDIR}
WRKSRC=     ${WRKDIR}/${GECKO_EXTDIR}
MOZSRC=     ${WRKSRC}/mozilla
.else
GECKO_WRKSRC=   ${WRKDIR}/../../../${GECKO_PORTDIR}/work/mozilla
WRKSRC=     ${WRKDIR}/mozilla
MOZSRC=     ${WRKSRC}
.endif

USE_GMAKE=  yes

.include <bsd.port.pre.mk>

XPI_FILE=   ${DISTNAME}-${GECKO}-freebsd${OSVERSION:C/([0-9]).+/\1/}-${ARCH}.xpi
PLIST_FILES=    %%DATADIR%%/${XPI_FILE}
PLIST_DIRS= %%DATADIR%%

.if ${ARCH} == "sparc64"
.if ${GECKO} == "seamonkey" || ${GECKO} == "thunderbird"
BROKEN=     Does not install on sparc64
.endif
.endif

do-extract:
    @${RM} -rf ${WRKDIR}
    @${MKDIR} ${WRKDIR}
    @${CP} -R ${GECKO_WRKSRC} ${WRKDIR}
    @for f in ${EXTRACT_ONLY}; do \
        cd ${WRKSRC}/mailnews/extensions && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$f ${EXTRACT_AFTER_ARGS}; \
    done

pre-patch:
    @${REINPLACE_CMD} -e "s|${GECKO_PORTDIR}|mail/enigmail-${GECKO}|g" \
        `${FIND} ${WRKSRC} -name autoconf.mk`

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

do-install:
    ${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${MOZSRC}/dist/bin/${DISTNAME:C/1.0.[0-9]/1.0/}-freebsd-${ARCH}.xpi ${DATADIR}/${XPI_FILE}

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>