blob: 4620366ea9aa4332f29c93d8451d7781baf811a4 (
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
71
72
73
74
75
76
77
78
79
80
|
# New ports collection makefile for: apache-ant
# Date created: 21 February 2001
# Whom: znerd@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= apache-ant
PORTVERSION= 1.5.4
CATEGORIES= devel java
MASTER_SITES= http://apache.mirror.trueserver.nl/dist/ant/binaries/ \
http://apache.proserve.nl/dist/ant/binaries/ \
http://apache.cs.uu.nl/dist/ant/binaries/ \
http://dist.apache.easynet.nl/ant/binaries/
DISTNAME= ${PORTNAME}-${PORTVERSION}-bin
MAINTAINER= znerd@FreeBSD.org
COMMENT= Java- and XML-based build tool, conceptually similar to make
USE_BZIP2= yes
USE_JAVA= 1.2+
NO_BUILD= YES
PORTDESTDIR= ${PREFIX}/ant
PLIST_SUB+= T=${PORTDESTDIR:S/^${PREFIX}\///}
READMES= LICENSE README WHATSNEW
DATADIRS= lib
.if !defined(NOPORTDOCS)
DATADIRS+= docs
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
do-patch:
@${CP} ${FILESDIR}/ant ${WRKSRC}/bin/ant
post-patch:
@${ECHO_CMD} -n ">> Customizing ant shell script..."
@${SED} \
-e "/%%ANT_HOME%%/s//${PORTDESTDIR:S/\//\\\//g}/g" \
-e "/%%JAVA%%/s//${JAVA:S/\//\\\//g}/g" \
-e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \
-e "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/g" \
${WRKSRC}/bin/ant > ${WRKDIR}/ant
@${MV} ${WRKDIR}/ant ${WRKSRC}/bin/ant
@${ECHO_CMD} " [ DONE ]"
@${ECHO_CMD} -n ">> Removing unneeded files..."
@${RM} -f ${WRKSRC}/lib/parser.jar
@${ECHO_CMD} " [ DONE ]"
do-install:
@${ECHO_CMD} -n ">> Creating destination directory..."
@${MKDIR} ${PORTDESTDIR}/bin
@${MKDIR} ${PORTDESTDIR}/lib
@${ECHO_CMD} " [ DONE ]"
@${ECHO_CMD} -n ">> Installing scripts..."
@cd ${INSTALL_WRKSRC}; \
${INSTALL_SCRIPT} ${WRKSRC}/bin/ant ${PREFIX}/bin; \
${INSTALL_SCRIPT} ${WRKSRC}/bin/antRun ${PORTDESTDIR}/bin;
@${ECHO_CMD} " [ DONE ]"
@${ECHO_CMD} -n ">> Installing readme files..."
@cd ${INSTALL_WRKSRC}; \
${INSTALL_DATA} ${READMES} ${PORTDESTDIR};
@${ECHO_CMD} " [ DONE ]"
.if defined(DATADIRS)
.for DIR in ${DATADIRS}
@${ECHO_CMD} -n ">> Installing data directory '${DIR}'..."
@cd ${INSTALL_WRKSRC}; \
${FIND} ${DIR} -type d -exec ${MKDIR} ${PORTDESTDIR}/\{} \; ;\
${FIND} ${DIR} -type f -exec ${INSTALL_DATA} \{} ${PORTDESTDIR}/\{} \;
@${ECHO_CMD} " [ DONE ]"
.endfor
.endif
.include <bsd.port.mk>
|