aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/lightning-xpi/Makefile
blob: d14c5fb5e40759fd2b8be302f496c1734858d675 (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
# New ports collection makefile for:    thunderbird-lightning
# Date created:     2006-10-13
# Whom:         Michael Johnson <ahze@FreeBSD.org>
#
# $FreeBSD$
#   $MCom: ports/deskutils/lightning-xpi/Makefile,v 1.4 2006/10/14 00:16:08 ahze Exp $

PORTNAME=   lightning
PORTVERSION=    ${ARCH_PORTVERSION}
PORTREVISION=   6
CATEGORIES= deskutils
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= ahze
PKGNAMESUFFIX=  -xpi
DISTNAME=   ${PORTNAME}-${PORTVERSION}-tb-FreeBSD${OS_VER}-${ARCH}
EXTRACT_SUFX=   .xpi

MAINTAINER= gnome@FreeBSD.org
COMMENT=    An integrated calendar for Thunderbird

CONFLICTS=  lightning-0.[0-9]*
NO_BUILD=   yes
USE_ZIP=    yes
EXTRACT_AFTER_ARGS=  -d ${WRKSRC}
PLIST?=     ${WRKDIR}/plist
LIGHTNING_DIR=  lib/thunderbird/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
USE_GECKO=  thunderbird
_IGNORE_MSG=    precompiled binaries, contact ahze@FreeBSD.org for build information

.include <bsd.port.pre.mk>
.include "${PORTSDIR}/www/mozilla/bsd.gecko.mk"

ARCH_PORTVERSION?=  0.7

.if ${ARCH}=="i386"
. if ${OSVERSION} < 600000
OS_VER= 5
. elif ${OSVERSION} >= 600000 && ${OSVERSION} < 700000
OS_VER= 6
WRKSRC:=    ${WRKSRC}/${WRKSRC:S/${WRKDIR}//}
. elif ${OSVERSION} >= 700000
OS_VER= 7
. else
IGNORE= ${_IGNORE_MSG}
. endif
.elif ${ARCH}=="sparc64"
. if ${OSVERSION} >= 600000 && ${OSVERSION} < 700000
OS_VER= 6
ARCH_PORTVERSION=   0.5
. elif ${OSVERSION} >= 700000
OS_VER= 7
ARCH_PORTVERSION=   0.5
. else
IGNORE= ${_IGNORE_MSG}
. endif
.elif ${ARCH}=="amd64"
. if ${OSVERSION} < 600000
OS_VER= 5
. elif ${OSVERSION} >= 600000 && ${OSVERSION} < 700000
OS_VER= 6
. elif ${OSVERSION} >= 700000
ARCH_PORTVERSION=   0.8
OS_VER= 7
. endif
.else
IGNORE= ${_IGNORE_MSG}
.endif

pre-install:
    ${RM} -f ${PLIST}
    cd ${WRKSRC} && ${FIND} -s * -type f -o -type l | \
        ${SED} -e 's|^|${LIGHTNING_DIR}/|' >> ${PLIST} && \
        ${FIND} -d * -type d | \
        ${SED} -e 's|^|@dirrm ${LIGHTNING_DIR}/|' >> ${PLIST}
    ${ECHO} "@dirrm ${LIGHTNING_DIR}" >> ${PLIST}

do-install:
    ${MKDIR} ${PREFIX}/${LIGHTNING_DIR}
    ${CHMOD} 0755 ${PREFIX}/${LIGHTNING_DIR}
    @(cd ${WRKSRC} && ${PAX} -U ${LIBOWN} -G ${LIBGRP} -vrw . ${PREFIX}/${LIGHTNING_DIR})

.include <bsd.port.post.mk>