freebsd-ports/net/javadc/Makefile
Ernst de Haan 3a74ff8d57 Introduction of NEED_JAVAC knob in bsd.java.mk, stage 1.
The NEED_JAVAC knob has been discussed on the freebsd-java
mailing list. It is documented at:

http://www.metaverse.nl/~ernst/writing.html

The second stage is the actual changing of bsd.java.mk.

Reviewed by:	java@FreeBSD.org
Approved by:	zach@neurosoft.org, joshua@roughtrade.net, lioux
2002-04-26 22:28:52 +00:00

58 lines
1.5 KiB
Makefile

# New ports collection makefile for: java Direct Connection
# Date created: Mon Nov 19 23:48:51 BRST 2001
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= javadc
PORTVERSION= 0.20
CATEGORIES= net java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= lioux@FreeBSD.org
USE_JAVA= 1.2+
NEED_JAVAC= YES
WRKSRC= ${WRKDIR}/DirectConnect${PORTVERSION}
BUILD_WRKSRC= ${WRKDIR}/classes
PLIST_SUB= JAR_DIR=${JAR_DIR} \
JAR_FILE=${JAR_FILE}
JAVAVM= ${LOCALBASE}/bin/javavm
JAR_DIR= share/java/jar/${PORTNAME}
JAR_MANIFEST= ${FILESDIR}/manifest
CLASS_SRCDIR= ${WRKSRC}/source
DOC_FILES= COPYING ChangeLog INSTALL README
post-patch:
@${SED} -e "s|%%JAR_DIR%%|${JAR_DIR}|;s|%%JAR_FILE%%|${JAR_FILE}|; \
s|%%JAVAVM%%|${JAVAVM}|;s|%%PREFIX%%|${PREFIX}|" \
${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh
# as far as build goes... ;)
do-build:
@${MKDIR} ${BUILD_WRKSRC}
@${JAVAC} -d ${BUILD_WRKSRC} -classpath ${BUILD_WRKSRC} ${CLASS_SRCDIR}/*.java 2>/dev/null
@${CP} ${CLASS_SRCDIR}/*.txt ${BUILD_WRKSRC}
@cd ${BUILD_WRKSRC} && ${JAR} -cmf ${JAR_MANIFEST} ${WRKDIR}/${JAR_FILE} *
do-install:
@${MKDIR} ${PREFIX}/${JAR_DIR}
@${INSTALL_DATA} ${WRKDIR}/${JAR_FILE} ${PREFIX}/${JAR_DIR}
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME:L}
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for doc in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.pre.mk>
JAR_FILE= ${PORTNAME}.jar
.include <bsd.port.post.mk>