blob: 4948d91274289c71fe03ecbe02a946b9ee4e2478 (
plain) (
blame)
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
|
# Created by: Matthew Seaman
# $FreeBSD$
PORTNAME= mysql-connector-java
PORTVERSION= 5.1.22
CATEGORIES= databases java
MASTER_SITES= ${MASTER_SITE_MYSQL}
MASTER_SITE_SUBDIR= Connector-J
MAINTAINER= matthew@FreeBSD.org
COMMENT= MySQL Connector/J: JDBC interface for MySQL
LICENSE= GPLv2
RUN_DEPENDS= ${JAVALIBDIR}/log4j.jar:${PORTSDIR}/devel/log4j
USE_JAVA= yes
JAVA_VERSION= 1.5+
BUILDDIR= ${WRKDIR}/${DISTNAME}
APIDOCSDIR= ${DOCSDIR}/javadoc
SRCDIR= ${WRKDIR}/${DISTNAME}/src
JAVADOCDIR= ${WRKDIR}/${DISTNAME}/javadoc
DESTJARFILE= ${PORTNAME}.jar
EXTRADOCS= CHANGES docs/connector-j.html docs/connector-j.pdf
JARFILE= ${DISTNAME}-bin.jar
JDCLASSPATH= ${SRCDIR}:${CLASSPATH}
PLIST_FILES= %%JAVAJARDIR%%/${DESTJARFILE}
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= *
.endif
do-build:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${JAVADOCDIR} && (cd ${SRCDIR}; \
${JAVADOC} -quiet -breakiterator -encoding utf8 \
-d ${JAVADOCDIR} -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..."
@${INSTALL_DATA} ${BUILDDIR}/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE}
@${ECHO_MSG} " [ DONE ]"
do-install-apidocs:
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${APIDOCSDIR}
@cd ${JAVADOCDIR} && for src in $$( ${FIND} . ) ; do \
dst=${APIDOCSDIR}$${src#.} ; \
if ${TEST} -d $$src ; then \
${MKDIR} $$dst ; \
else \
${INSTALL_DATA} $$src $$dst ; \
fi \
done
@for extradoc in ${EXTRADOCS} ; do \
${INSTALL_DATA} ${INSTALL_WRKSRC}/$$extradoc ${DOCSDIR} ; \
done
@${ECHO_MSG} " [ DONE ]"
.endif
.include <bsd.port.mk>
|