freebsd-ports/java/linux-blackdown-jdk14/Makefile
Boris Samorodov 0263b9d868 Welcome to the new linux ports infrastructure which allows using
both current (fc4) and future linux (f8) distributions at one
ports tree.

The patch contains full changes to ports/Mk files and all ports involved.
But only infrastructure is changed. The resulting packages are the same as
before. Hence no need to bump PORTREVISIONs.

The idea was taken from bsd.gnome.mk and others.

More than 130 ports are switched to follow a new linux infrastructure
introduced by changes to bsd.port.mk, bsd.linux-rpm.mk and a new
bsd.linux-apps.mk.

Thanks for all who was involved and helped me with this work.
And help from Alexander Leidinger was incredible.

Other changes are coming. Stay tuned!

PR:		ports/132510
Submitted by:	bsam (me)
Exp-run by:	portmgr (pav)
2009-03-19 17:28:51 +00:00

82 lines
2.5 KiB
Makefile

# New ports collection makefile for: linux-blackdown-jdk14
# Date created: 12 August 2002
# Whom: Ernst de Haan <znerd@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}
PORTREVISION= 3
CATEGORIES= java
MASTER_SITES= ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/${DOWNLOAD_DIR}/ \
ftp://ftp.tux.org/pub/java/${DOWNLOAD_DIR}/
PKGNAMEPREFIX= linux-blackdown-
DISTNAME= j2sdk-${JDK_VERSION}${JDK_VER_SUFFIX}-linux-i586
EXTRACT_SUFX= .bin
MAINTAINER= java@FreeBSD.org
COMMENT= Blackdown Java Development Kit 1.4 for Linux
RUN_DEPENDS= ${LOCALBASE}/bin/javavm:${PORTSDIR}/java/javavmwrapper
EXTRACT_CMD= ${TAIL}
EXTRACT_BEFORE_ARGS= +592
EXTRACT_AFTER_ARGS= | ${BZIP2_CMD} -dc | ${TAR} xf -
USE_BZIP2= yes
USE_LINUX= yes
USE_LINUX_APPS= xorglibs
LATEST_LINK= linux-blackdown-jdk14
WRKSRC= ${WRKDIR}/j2sdk${PORTVERSION}
PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///} PORTVERSION=${PORTVERSION}
NO_BUILD= yes
JDK_VERSION= 1.4.2
JDK_VER_SUFFIX= -02
DOWNLOAD_DIR= ${PORTNAME:U}-${JDK_VERSION}/i386/02
ONLY_FOR_ARCHS= i386 amd64
RESTRICTED= "License doesn\'t allow binary distribution or distribution with fee"
APP_HOME= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME}${JDK_VERSION}
PACKED_JARS= lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar jre/lib/charsets.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar jre/javaws/javaws.jar
UNPACK_CMD= ${APP_HOME}/lib/unpack
.include <bsd.port.pre.mk>
post-fetch:
@${CHMOD} +x ${DISTDIR}/${DISTFILES}
post-patch:
@${ECHO} -n ">> Removing unneeded files..."
@${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f
@${RM} -rf ${WRKSRC}/demo/jfc/SwingSet2/resources
@${RM} -rf ${WRKSRC}/demo/plugin/jfc/SwingSet2/resources
@${ECHO} " [ DONE ]"
# XXX: This is missing a "${BRANDELF} -t Linux <executables>".
do-install:
@${ECHO} -n ">> Creating destination directory ${APP_HOME}..."
@${MKDIR} ${APP_HOME}
@${ECHO} " [ DONE ]"
@${ECHO} -n ">> Copying files..."
@${CP} -R ${WRKSRC}/* ${APP_HOME}
@${CHOWN} -h -R ${LIBOWN}:${LIBGRP} ${APP_HOME}
@${ECHO} " [ DONE ]"
@${ECHO} -n ">> Unpacking JARs..."
@for i in ${PACKED_JARS}; do \
if [ -f ${APP_HOME}/`dirname $$i`/`basename $$i .jar`.pack ]; then \
${UNPACK_CMD} ${APP_HOME}/`dirname $$i`/`basename $$i .jar`.pack ${APP_HOME}/$$i; \
${RM} -f ${APP_HOME}/`dirname $$i`/`basename $$i .jar`.pack; \
fi \
done
@${ECHO} " [ DONE ]"
@${ECHO} -n ">> Registering with javavm..."
@${LOCALBASE}/bin/registervm "${APP_HOME}/bin/java # Linux-Blackdown-JDK${PORTVERSION}"
@${ECHO} " [ DONE ]"
.include <bsd.port.post.mk>