summaryrefslogtreecommitdiff
path: root/www/navigator/Makefile.common
blob: 2d1f144b03e2e5a9a0adf5bc3da3d6b829c4ab02 (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# $NetBSD: Makefile.common,v 1.67 2003/12/04 14:59:22 grant Exp $
#
# Common include file for communicator and navigator packages

.include "../../mk/bsd.prefs.mk"

# Note - the version will be overridden for certain architectures which
#	 do not have the latest version available (eg: SunOS sparc)
NS_VERS=	4.8
PKGNAME=	${BINNAME}-4.80
NS_ENCRYPTION=	us
LDAP_VERS=	40

MASTER_SITES=	ftp://ftp.netscape.com/pub/communicator/${SUB}/ \
		ftp://ftp.de.netscape.com/pub/communicator/${SUB}/ \
		ftp://ftp-uk.netscape.com/pub/communicator/${SUB}/ \
		ftp://sunsite.utk.edu/pub/netscape/communicator/${SUB}/ \
		ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.netscape.com/pub/communicator/${SUB}/
#
# Based on OPSYS and MACHINE_ARCH, define:
#	PLIST_ARCH	ARCH specific PLIST contents
#	DISTUNAME	Used to determine DISTNAME (tarfile on ftp server)
#	DIST_DIR_NAME	Directory on ftp site from which to download
#	WRKNAME		Used to determine WRKSRC (directoryname in tarfile)
#	VENDOR_NAME	Only used in '128-bit key version' information message
#
.if ${OPSYS} == "SunOS" && ${MACHINE_ARCH} == "sparc"
PLIST_ARCH=	solaris-sparc
.  if !empty(OS_VERSION:M5.5.1*) || !empty(OS_VERSION:M5.[67]*)
NS_VERS=	4.79
PKGNAME=	${BINNAME}-${NS_VERS}
DISTUNAME=	sparc-sun-solaris2.5.1
DIST_DIR_NAME=	supported/sunos551
WRKNAME=	sparc-sun-solaris2.5.1
VENDOR_NAME=	Solaris 2.5.1
.  else
DISTUNAME=	sparc-sun-solaris2.8
DIST_DIR_NAME=	supported/sunos58
WRKNAME=	sparc-sun-solaris2.8
VENDOR_NAME=	Solaris 2.8
.  endif
.  if !defined(NS_NO_FLASH)
DEPENDS+=	ns-flash>4.0:../../graphics/ns-flash
.  endif

.elif ${MACHINE_ARCH} == "alpha"
.  if !exists(/emul/osf1/sbin/loader)
PKG_FAIL_REASON= "${PKGNAME} requires Digital UNIX libraries - see compat_osf1(8)"
.  endif
NS_VERS=	4.78
PKGNAME=	${BINNAME}-${NS_VERS}
PLIST_ARCH=	osf-alpha
DISTUNAME=	alpha-dec-osf4.0
DIST_DIR_NAME=	supported/dec_unix40
WRKNAME=	alpha-dec-osf4.0
VENDOR_NAME=	Tru64 UNIX

.elif ${MACHINE_ARCH} == "i386" && defined(NS_USE_BSDI)
NS_VERS=	4.75
PKGNAME=	${BINNAME}-${NS_VERS}
PLIST_ARCH=	bsdi-i386
DISTUNAME=	x86-bsdi-bsd2
DIST_DIR_NAME=	unsupported/bsdi21
WRKNAME=	x86-bsdi-bsd2
VENDOR_NAME=	BSD/OS 2.1

.elif ${MACHINE_ARCH} == "i386"
PLIST_ARCH=	linux-i386
DISTUNAME=	x86-unknown-linux2.2
DIST_DIR_NAME=	supported/linux22
WRKNAME=	x86-unknown-linux2.2
VENDOR_NAME=	Linux 2.2
.  if !defined(NS_NO_FLASH)
DEPENDS+=	ns-flash>4.0:../../graphics/ns-flash
.  endif

.elif ((${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && defined(NS_USE_SUNOS))
.  if !exists(/emul/sunos/usr/lib/ld.so)
PKG_FAIL_REASON= "${PKGNAME} requires SunOS libraries - see compat_sunos(8)"
.  endif
NS_VERS=	4.61
PKGNAME=	${BINNAME}-${NS_VERS}
NS_ENCRYPTION=	export
LDAP_VERS=	30
PLIST_ARCH=	sunos-sparc
DISTUNAME=	sparc-sun-sunos4.1.3_U1
DIST_DIR_NAME=	unsupported/sunos413
WRKNAME=	${DISTUNAME}
VENDOR_NAME=	SunOS 4.1.3
MASTER_SITES=	ftp://archive.netscape.com/archive/communicator/${SUB}/

.elif ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
PLIST_ARCH=	solaris-sparc
.  if !exists(/emul/svr4/usr/lib/ld.so.1)
PKG_FAIL_REASON= "${PKGNAME} requires Solaris libraries - see compat_svr4(8)"
.  endif
NS_VERS=	4.79
PKGNAME=	${BINNAME}-${NS_VERS}
DISTUNAME=      sparc-sun-solaris2.5.1
DIST_DIR_NAME=  supported/sunos551
WRKNAME=        sparc-sun-solaris2.5.1
VENDOR_NAME=    Solaris 2.5.1

# powerpc is "unusual"
.elif ${MACHINE_ARCH} == "powerpc"
.  if ${BINNAME} == "navigator"
PKG_FAIL_REASON=  "There is no navigator-only package for PowerPC"
PKG_FAIL_REASON+= "platform.  Please cd to ../communicator and"
PKG_FAIL_REASON+= "install communicator package instead."
.  endif
NS_VERS=	4.73
PKGNAME=	${BINNAME}-${NS_VERS}
DISTNAME=	netscape-4.7-3.ppc
WRKSRC=		${WRKDIR}
# was: ftp://ftp.linuxppc.org/linuxppc-halloween/software/
MASTER_SITES=	ftp://ftp.riken.go.jp/pub/Linux/linuxppc/linuxppc-halloween/software/ \
		ftp://gd.tuwien.ac.at/linux/linuxppc/linuxppc-halloween/software/
EXTRACT_SUFX=	.rpm
HOMEPAGE=	http://linuxppc.org/software/index/linuxppc_stable/software/netscape-4.7-3.ppc.html
BUILD_DEPENDS=	rpm2pkg>=1.2:../../pkgtools/rpm2pkg
DESCR_SRC=	${WRKDIR}/DESCR.linux-powerpc
PLIST_SRC=	${WRKDIR}/PLIST_DYNAMIC
SORT=		sort
RPM2PKG=	rpm2pkg
RPM2PKGARGS=	${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}
VENDOR_NAME=	# empty.  what should be here?

.else
PLIST_ARCH=
.endif

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE?=	http://home.netscape.com/browsers/index.html
RESTRICTED=	"No re-distribution without agreement from Netscape"
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}
NO_SRC_ON_FTP=		${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}

ONLY_FOR_PLATFORM= *-*-alpha *-*-i386 *-*-powerpc *-*-sparc *-*-sparc64
CATEGORIES=	www
NS_NAME=	${BINNAME}-${NS_VERS}
PKGNAME?=	${BINNAME}-${NS_VERS}
DISTNAME?=	${BINNAME}-v${NS_VERS_SHORT}-${NS_ENCRYPTION}.${DISTUNAME}

.if (${OPSYS} != "Linux" && ((${MACHINE_ARCH} == "i386" && !defined(NS_USE_BSDI)) || ${MACHINE_ARCH} == "powerpc"))
DEPENDS+=	suse_compat>=6.4:../../emulators/${SUSE_DIR_PREFIX}_compat
DEPENDS+=	suse_x11>=6.4:../../emulators/${SUSE_DIR_PREFIX}_x11
.endif

.if ${BINNAME} != "netscape"
NO_BUILD=	YES

# powerpc is "unusual"
.  if ${MACHINE_ARCH} == "powerpc"
do-extract:
	${MKDIR} ${WRKSRC}

do-install:
	${CP} ${PKGDIR}/DESCR.linux-powerpc ${WRKDIR}
	${RM} -f ${PLIST_SRC}
	${RPM2PKG} -d ${PREFIX} -f ${PLIST_SRC} -s 1 ${RPM2PKGARGS}

	${SED} -e 's#@BINNAME@#${BINNAME}#g' \
	       -e 's#@PREFIX@#${PREFIX}#g' \
	    <${FILESDIR}/${BINNAME}.sh.linux-powerpc >${WRKDIR}/${BINNAME}.sh
	${INSTALL_SCRIPT} ${WRKDIR}/${BINNAME}.sh ${PREFIX}/bin/${NS_NAME}
	${RM} -f ${PREFIX}/bin/${BINNAME}
	${LN} -sf ${NS_NAME} ${PREFIX}/bin/${BINNAME}
	${ECHO} bin/${BINNAME} >> ${PLIST_SRC}
	${ECHO} bin/${NS_NAME} >> ${PLIST_SRC}
	${SORT} -r ${PLIST_SRC} > ${PLIST_SRC}.sorted
	${MV} ${PLIST_SRC}.sorted ${PLIST_SRC}
.  else
NS_VERS_SHORT=	${NS_VERS:S/.//}
SUB=		english/${NS_VERS}/unix/${DIST_DIR_NAME}/${DIST_SDIR_NAME}

BUILD_DEFS+=	NS_ENCRYPTION
DIST_SUBDIR=	netscape

WRKSRC=         ${WRKDIR}/${BINNAME}-v${NS_VERS_SHORT}.${WRKNAME}
MOZILLA_HOME=	${PREFIX}/lib/netscape/${NS_NAME}
NS_PLUGINS_DIR=	${PREFIX}/lib/netscape/plugins

PLIST_SRC=	${PKGDIR}/PLIST.pre \
		${PKGDIR}/PLIST.${PLIST_ARCH} \
		${PKGDIR}/PLIST.post
PLIST_SUBST+=	NS_VERS=${NS_VERS} LDAP_VERS=${LDAP_VERS} BINNAME=${BINNAME}

do-install:
	${INSTALL_DATA_DIR} ${MOZILLA_HOME}/java/classes
	${INSTALL_SCRIPT} ${WRKSRC}/vreg ${MOZILLA_HOME}
.    for file in ifc11.jar iiop10.jar jae40.jar java40.jar jio40.jar \
       jsd10.jar ldap${LDAP_VERS}.jar resource.jar scd10.jar
	${INSTALL_DATA} ${WRKSRC}/${file} ${MOZILLA_HOME}/java/classes
.    endfor
	cd ${MOZILLA_HOME} && ${DECOMPRESS_CMD} \
		${WRKSRC}/nethelp-v${NS_VERS_SHORT}.nif | ${PAX} -r
	cd ${MOZILLA_HOME} && ${DECOMPRESS_CMD} \
		${WRKSRC}/netscape-v${NS_VERS_SHORT}.nif | ${PAX} -cr \
		'*libflashplayer.so' '*ShockwaveFlash.class' '*dynMotif*' \
		|| ${TRUE}
.    if ${BINNAME} == "communicator"
	cd ${MOZILLA_HOME} && ${GTAR} xpzf ${WRKSRC}/spellchk-v${NS_VERS_SHORT}.nif
.    endif

	${SED} -e 's#@@MOZILLA_HOME@@#${MOZILLA_HOME}#g' \
	       -e 's#@@NS_PLUGINS_DIR@@#${NS_PLUGINS_DIR}#g' \
	    <${FILESDIR}/${BINNAME}.sh >${WRKDIR}/${BINNAME}.sh
	${INSTALL_SCRIPT} ${WRKDIR}/${BINNAME}.sh ${PREFIX}/bin/${NS_NAME}
	${RM} -f ${PREFIX}/bin/${BINNAME}
	${LN} -sf ${NS_NAME} ${PREFIX}/bin/${BINNAME}

.    if ${PLIST_ARCH} == "sunos-sparc"
	# Bizarre magic to handle the NIS and DNS versions. Make DNS default.
	@${SED} -e 's#MOZILLA_HOME/netscape#MOZILLA_HOME/netscape_nis#g' \
	    <${WRKDIR}/${BINNAME}.sh >${WRKDIR}/${BINNAME}_nis.sh
	${INSTALL_SCRIPT} ${WRKDIR}/${BINNAME}_nis.sh \
	    ${PREFIX}/bin/${NS_NAME}_nis
.      if ${BINNAME} == "communicator"
	${LN} -sf ${NS_NAME}_nis ${PREFIX}/bin/netscape_nis
.      endif
	${MV} ${MOZILLA_HOME}/netscape ${MOZILLA_HOME}/netscape_nis
	${MV} ${MOZILLA_HOME}/netscape_dns ${MOZILLA_HOME}/netscape
.    endif
	${INSTALL_DATA_DIR} ${NS_PLUGINS_DIR}

	${CHOWN} -R 0:0 ${MOZILLA_HOME}
	${CHMOD} -R go-w ${MOZILLA_HOME}
.  endif

.endif

.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386" && !defined(NS_USE_BSDI)
NS_NEED_LINUX=	yes
.elif ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
NS_NEED_LINUX=	yes
.elif ${OPSYS} == "Linux"
NS_NEED_LINUX=	yes
.endif

.if ${BINNAME} != "netscape"
USE_BUILDLINK2=	# defined
.  if defined(NS_NEED_LINUX)
.    include "../../emulators/suse_linux/Makefile.application"
.  endif
.endif