summaryrefslogtreecommitdiff
path: root/www/linux-firefox/Makefile
blob: 856db89bdd41444c7e205e50cd3815267b06738d (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# New ports collection makefile for:   linux-firefox
# Date created:                                2004-09-17
# Whom:                                        voisine
#
# $FreeBSD$
#

PORTNAME=	firefox
PORTVERSION=	1.0.7
CATEGORIES?=	www linux
MASTER_SITES=	${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR?=	firefox/releases/${PORTVERSION}/linux-i686/en-US
PKGNAMEPREFIX?=	linux-
DISTNAME?=	firefox-${PORTVERSION}

MAINTAINER=	voisine@gmail.com
COMMENT=	Web browser branched from Mozilla

RUN_DEPENDS?=	${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2 \
		${LINUXBASE}/usr/lib/libatk-1.0.so.0:${PORTSDIR}/accessibility/linux-atk \
		${LINUXBASE}/usr/lib/libpangoxft-1.0.so.0:${PORTSDIR}/x11-toolkits/linux-pango\
		${LINUXBASE}/usr/lib/libgobject-2.0.so.0:${PORTSDIR}/devel/linux-glib2 \
		${LINUXBASE}/usr/lib/libfontconfig.so.1:${PORTSDIR}/x11-fonts/linux-fontconfig

NO_BUILD=	yes
ONLY_FOR_ARCHS=i386 amd64
FIREFOX_NAME=	${PKGNAMEPREFIX}${PORTNAME}
DESCR=		${.CURDIR}/pkg-descr
MD5_FILE=	${.CURDIR}/distinfo
PKGMESSAGE=	${WRKDIR}/pkg-message
PLIST=		${WRKDIR}/pkg-plist
USE_LINUX=	yes
USE_X_PREFIX=	yes
WRKSRC=		${WRKDIR}/firefox

do-patch:
	${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/linkfarm
	${ECHO_CMD} \
	"# Run this after installing Beonex, Mozilla or Netscape plugins." \
		>>${WRKDIR}/linkfarm
	${ECHO_CMD} "cd ${PREFIX}/lib/${FIREFOX_NAME}/plugins" \
		>>${WRKDIR}/linkfarm
	${ECHO_CMD} "${FIND} -L . -type l -delete" \
		>>${WRKDIR}/linkfarm

.for ii in \
	lib/linux-beonex/plugins \
	lib/netscape-linux/plugins \
	lib/flash \
	lib/linux-mozilla/plugins \
	lib/linux-netscape*/plugins \
	lib/linux-flashplugin6 \
	lib/linux-flashplugin7 \
	linux-blackdown-jdk1.3.1/jre/plugin/i386/mozilla \
	linux-blackdown-jdk1.4.2/jre/plugin/i386/mozilla
	${ECHO_CMD} -n "${FIND} ${LOCALBASE}/${ii}/*" \
		>>${WRKDIR}/linkfarm
	${ECHO_CMD} " -maxdepth 1 -exec ${LN} -s {} \; 2>/dev/null" \
		>>${WRKDIR}/linkfarm
.endfor

pre-install:
	${ECHO_CMD} bin/${FIREFOX_NAME} > ${PLIST}
	${ECHO_CMD} lib/${FIREFOX_NAME}/${FIREFOX_NAME}-bin >> ${PLIST}
	${ECHO_CMD} \
		"@unexec ${FIND} ${PREFIX}/lib/${FIREFOX_NAME}/plugins \
		-type l -exec ${RM} {} \;" >> ${PLIST}
	cd ${WRKSRC} && ${FIND} -s * -type f -o -type l | \
		${SED} -e 's:^:lib/${FIREFOX_NAME}/:' >> ${PLIST} \
		&& ${FIND} -d * -type d | \
		${SED} -e 's:^:@dirrm lib/${FIREFOX_NAME}/:' >> ${PLIST}
	${ECHO_CMD} lib/${FIREFOX_NAME}/linkfarm >> ${PLIST}
	${ECHO_CMD} @dirrm lib/${FIREFOX_NAME} >> ${PLIST}
	${ECHO_CMD} "@exec ${PREFIX}/lib/${FIREFOX_NAME}/linkfarm" \
		>> ${PLIST}

do-install:
	${MKDIR} ${PREFIX}/lib/${FIREFOX_NAME}
	${CHMOD} 755 ${PREFIX}/lib/${FIREFOX_NAME}
	cd ${WRKSRC} && ${FIND} * | \
		${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} \
		${PREFIX}/lib/${FIREFOX_NAME}
	${LN} -sf ${PREFIX}/lib/${FIREFOX_NAME}/firefox \
		${PREFIX}/bin/${FIREFOX_NAME}
	${LN} -sf ${PREFIX}/lib/${FIREFOX_NAME}/firefox-bin \
		${PREFIX}/lib/${FIREFOX_NAME}/${FIREFOX_NAME}-bin
	${INSTALL_SCRIPT} ${WRKDIR}/linkfarm \
	${PREFIX}/lib/${FIREFOX_NAME}

post-install:
	@${ECHO_CMD} \*\* After adding plugins to \(Linux\) Beonex,
	@${ECHO_CMD} \*\* Mozilla or Netscape, run\
		> ${PKGMESSAGE}
	@${ECHO_CMD} \*\* ${PREFIX}/lib/${FIREFOX_NAME}/linkfarm as root \
		>> ${PKGMESSAGE}
	@${ECHO_CMD} \*\* to make them available to ${FIREFOX_NAME}. \
		>> ${PKGMESSAGE}
	@- ${SH} ${PREFIX}/lib/${FIREFOX_NAME}/linkfarm || true
	@ ${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>