summaryrefslogtreecommitdiff
path: root/lang/sun-jre6/Makefile
blob: f1e6a5f84b096c2134b074e360095db931f6a943 (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
# $NetBSD: Makefile,v 1.13 2008/05/26 02:13:21 joerg Exp $

# Note: Regen distinfo with PKG_DEFAULT_OPTIONS+=sun-jre-jce
# Note: Update DOWNLOAD_NAME when you update the JRE version

DISTNAME=	jre-6u5-linux-${DIST_ARCH}
PKGNAME=	sun-jre6-6.0.5
MASTER_SITES=	# empty

DOWNLOAD_NAME=	Java Runtime Environment (JRE) 6u5
SHORT_NAME=	JRE

USE_TOOLS+=	pax

WRKSRC=		${WRKDIR}/jre1.6.0_05
JAVA_WRAPPERS=	java javaws keytool orbd policytool rmid rmiregistry \
		servertool tnameserv
REQD_DIRS=	${JAVA_HOME}
REQD_DIRS+=	${JAVA_HOME}/lib
REQD_DIRS+=	${JAVA_HOME}/lib/applet
REQD_DIRS+=	${JAVA_HOME}/lib/images
REQD_DIRS+=	${JAVA_HOME}/lib/images/cursors
REQD_DIRS+=	${JAVA_HOME}/lib/security
CONF_FILES=	# empty

LICENSE=	sun-jre6-license

.include "../../lang/sun-jre6/Makefile.common"

.sinclude "sfiles-${EMUL_ARCH}.mk"

.for FILE in ${SFILES}
CONF_FILES+=	${JAVA_HOME}/lib/${FILE}.default ${JAVA_HOME}/lib/${FILE}
.endfor

CHECK_FILES_SKIP+=	${JAVA_HOME}/lib/${EMUL_ARCH}/client/classes.jsa

PKG_OPTIONS_VAR=	PKG_OPTIONS.sun-jre6
PKG_SUPPORTED_OPTIONS=	sun-jre-jce

.include "../../mk/bsd.options.mk"

PLIST_VARS+=	jce
.if !empty(PKG_OPTIONS:Msun-jre-jce)
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} jce_policy-6.zip
PLIST.jce=	yes
.endif

# Some of the binaries require libX11, so ensure that requirement is
# satisfied when the package is installed on the native OS.
#
.if defined(EMUL_IS_NATIVE)
.  if ${X11_TYPE} == "native"
.    if ${EMUL_ARCH} == "x86_64"
LIBX11=		${X11PREFIX}/lib64/libX11.so.6
.    else
LIBX11=		${X11PREFIX}/lib/libX11.so.6
.    endif
.    if !exists(${LIBX11})
PKG_FAIL_REASON+=	"${LIBX11} does not exist.  Please install the" \
			"X11 library packages for your system."
.    endif
.  else
.    include "../../x11/libX11/buildlink3.mk"
LIBX11=		${X11PREFIX}/lib/libX11.so.6
.  endif

PLIST_SUBST+=		LIBX11=

.PHONY: create-library-symlinks
post-install: create-library-symlinks
create-library-symlinks:
	${RUN}${LN} -fs ${LIBX11} ${JAVA_HOME}/lib/${EMUL_ARCH}
.else
PLIST_SUBST+=		LIBX11="@comment "
.endif

post-extract:
	${MKDIR} ${WRKSRC}/.systemPrefs
	${TOUCH} ${WRKSRC}/.systemPrefs/.system.lock
	${TOUCH} ${WRKSRC}/.systemPrefs/.systemRootModFile

do-configure:
	cd ${WRKSRC}/lib; for file in ${SFILES}; do			\
		${MV} -f $$file $$file.default;				\
	done

pre-install:
.if !empty(PKG_OPTIONS:Msun-jre-jce)
	cd ${WRKDIR}/jce ; pax -rw -pe -v . ${WRKSRC}/lib/security
.endif

#
# re-create sfiles.mk from properties and config files
#
makesfiles:
	${ECHO} >  sfiles-${MACHINE_ARCH}.mk '#	$$Net''BSD$$'
	${ECHO} >> sfiles-${MACHINE_ARCH}.mk '#'
	${ECHO} >> sfiles-${MACHINE_ARCH}.mk '# Created with "make makesfiles"'
	${ECHO} >> sfiles-${MACHINE_ARCH}.mk '# Do not edit this file manually!'
	${ECHO} >> sfiles-${MACHINE_ARCH}.mk '#'
	cd ${WRKSRC}/lib && ${FIND} * -name fontconfig.\* -o		\
		-name \*.properties -o -name \*.properties.\?\? -o	\
		-name \*.cfg -o -name \*.security |			\
	${SED} 's/^/SFILES+=	/' >> ${PKGDIR}/sfiles-${MACHINE_ARCH}.mk

.include "../../mk/bsd.pkg.mk"