f5b4176d87
- Use ${JAVALIBDIR} for JAR dependencies - Use %%JAVAJARDIR%% in plist - ECHO_CMD -> ECHO_MSG - Add $FreeBSD$ tag in patch - Improve the build.xml patch to have the location of JAR files set through MAKE_ARGS (should help with people with non-standard paths) PR: 77916 [1] Submitted by: maintainer [1] Approved by: maintainer
98 lines
2.6 KiB
Makefile
98 lines
2.6 KiB
Makefile
# New ports collection makefile for: mysql-connector-java
|
|
# Date created: 8 October 2003
|
|
# Whom: Matthew Seaman <m.seaman@infracaninophile.co.uk>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= mysql-connector-java
|
|
PORTVERSION= 3.1.7
|
|
CATEGORIES= databases java
|
|
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
|
MASTER_SITE_SUBDIR= Connector-J
|
|
|
|
MAINTAINER= m.seaman@infracaninophile.co.uk
|
|
COMMENT= MySQL Connector/J: JDBC interface for MySQL
|
|
|
|
RUN_DEPENDS= ${JAVALIBDIR}/log4j.jar:${PORTSDIR}/devel/log4j
|
|
|
|
.if !defined(WITHOUT_COMPILE)
|
|
|
|
BUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit \
|
|
${JAVALIBDIR}/log4j.jar:${PORTSDIR}/devel/log4j
|
|
|
|
USE_JAVA= yes
|
|
USE_ANT= yes
|
|
JAVA_VERSION= 1.4+
|
|
ALL_TARGET= clean compile-driver
|
|
MAKE_ARGS= -Djavajardir=${JAVAJARDIR}
|
|
BUILDDIR= ${WRKDIR}/build-mysql-jdbc/${DISTNAME}
|
|
|
|
.else
|
|
|
|
USE_JAVA= yes
|
|
JAVA_VERSION= 1.2+
|
|
BUILDDIR= ${WRKDIR}/${DISTNAME}
|
|
|
|
.endif
|
|
|
|
APIDOCSDIR= ${DOCSDIR}/javadoc
|
|
DESTJARFILE= ${PORTNAME}.jar
|
|
EXTRAJARS= jdbc2_0-stdext.jar jta-spec1_0_1.jar
|
|
EXTRADOCS= README CHANGES
|
|
JARFILE= ${DISTNAME}-bin.jar
|
|
JDCLASSPATH= ${WRKSRC}:${WRKSRC}/lib/jdbc2_0-stdext.jar:${WRKSRC}/lib/jta-spec1_0_1.jar:${CLASSPATH}
|
|
|
|
PLIST_FILES= %%JAVAJARDIR%%/jdbc2_0-stdext.jar \
|
|
%%JAVAJARDIR%%/jta-spec1_0_1.jar \
|
|
%%JAVAJARDIR%%/mysql-connector-java.jar
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
PORTDOCS= *
|
|
.endif
|
|
|
|
pre-fetch:
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "You may use the following build options:"
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} " WITHOUT_COMPILE=yes Install the pre-compiled .jar file"
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "This port requires JDK 1.4.x or better to compile, but the"
|
|
@${ECHO_MSG} "JDBC driver will operate with JVM 1.2.x or better"
|
|
@${ECHO_MSG} ""
|
|
|
|
.if !defined(WITHOUT_COMPILE)
|
|
post-build:
|
|
.else
|
|
do-build:
|
|
.endif
|
|
.if !defined(NOPORTDOCS)
|
|
@${MKDIR} ${BUILDDIR}/doc && (cd ${BUILD_WRKSRC}; \
|
|
${JAVADOC} -d ${BUILDDIR}/doc -package \
|
|
-classpath ${JDCLASSPATH} \
|
|
com.mysql.jdbc org.gjt.mm.mysql)
|
|
.endif
|
|
|
|
do-install: do-install-jar do-install-apidocs
|
|
|
|
do-install-jar:
|
|
@${ECHO_MSG} -n ">> Installing .jar files..."
|
|
@${MKDIR} ${JAVAJARDIR}
|
|
@${INSTALL_DATA} ${BUILDDIR}/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE}
|
|
@for extrajar in ${EXTRAJARS} ; do \
|
|
${INSTALL_DATA} ${INSTALL_WRKSRC}/lib/$$extrajar ${JAVAJARDIR} ; \
|
|
done
|
|
@${ECHO_MSG} " [ DONE ]"
|
|
|
|
do-install-apidocs:
|
|
.if !defined(NOPORTDOCS)
|
|
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
|
|
@${MKDIR} ${APIDOCSDIR}
|
|
@${CP} -r ${BUILDDIR}/doc/* ${APIDOCSDIR}
|
|
@for extradoc in ${EXTRADOCS} ; do \
|
|
${INSTALL_DATA} ${BUILDDIR}/$$extradoc ${DOCSDIR} ; \
|
|
done
|
|
@${ECHO_MSG} " [ DONE ]"
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|