[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / sun-jre15

File: [cvs.NetBSD.org] / pkgsrc / lang / sun-jre15 / Attic / Makefile (download)

Revision 1.56, Tue May 19 08:59:20 2009 UTC (14 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2009Q2-base, pkgsrc-2009Q2
Changes since 1.55: +3 -3 lines

Use standard location for LICENSE line (in MAINTAINER/HOMEPAGE/COMMENT
block). Uncomment some commented out LICENSE lines while here.

# $NetBSD: Makefile,v 1.56 2009/05/19 08:59:20 wiz Exp $

# Note: Regen distinfo with PKG_DEFAULT_OPTIONS+=sun-jre-jce

DISTNAME=	jre-1_5_0_16-linux-${DIST_ARCH}
PKGNAME=	sun-jre15-5.0.16
MASTER_SITES=	# empty

LICENSE=	sun-jre6-license

SHORT_NAME=	JRE

USE_TOOLS+=	pax

WRKSRC=		${WRKDIR}/${DISTNAME:S/-//:S/_/./:S/_/./:C/-linux-.*//}
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

.include "../../lang/sun-jre15/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-jre15
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-1_5_0.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:
.if ${EMUL_ARCH} == "i386"
	${CHMOD} -x ${WRKSRC}/lib/javaws/messages_zh_HK.properties
.endif
	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"