aboutsummaryrefslogtreecommitdiffstats
path: root/java/jakarta-commons-cli/Makefile
blob: 9f4350c8d49b489926459dc7b61d59123c1d383d (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
# New ports collection makefile for:    Jakarta Commons CLI
# Date created:             November 14, 2002
# Whom:                 Ernst de Haan <znerd@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   commons-cli
PORTVERSION=    1.0
PORTEPOCH=  1
CATEGORIES= java
MASTER_SITES=   ${MASTER_SITE_APACHE_JAKARTA}
MASTER_SITE_SUBDIR= commons/cli/source
PKGNAMEPREFIX=  jakarta-
DISTNAME=   cli-${PORTVERSION}-src

MAINTAINER= znerd@FreeBSD.org
COMMENT=    Java library for command line arguments and options

BUILD_DEPENDS=  ${ANT}:${PORTSDIR}/devel/apache-ant \
        ${LOCALBASE}/share/java/classes/commons-lang.jar:${PORTSDIR}/java/jakarta-commons-lang

USE_JAVA=   yes
JAVA_VERSION=   1.2+
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

ANT?=       ${LOCALBASE}/bin/ant
.if defined(NOPORTDOCS)
ANT_TARGET= jar -Dnoget
.else
ANT_TARGET= jar javadoc -Dnoget -verbose
.endif
JAVASHAREDIR=   ${PREFIX}/share/java
JARDIR=     ${JAVASHAREDIR}/classes
JARFILE=    ${PORTNAME}-${PORTVERSION}-beta-2-dev.jar
DESTJARFILE=    ${PORTNAME}.jar
PLIST_FILES+=   ${JAVAJARDIR:S,^${PREFIX}/,,}/${DESTJARFILE}

.if !defined(NOPORTDOCS)
PORTDOCS=   apidocs LICENSE.txt
.endif

do-build:
    @${MKDIR} ${WRKSRC}/lib
    @cd ${WRKSRC} && ${SETENV} ANT_INCLUDE_SHARED_JARS=YES ${ANT} ${ANT_TARGET}

do-install:
    @${ECHO} -n ">> Installing JAR as ${JARDIR}/${DESTJARFILE}..."
    @${CP} ${WRKSRC}/target/${JARFILE} ${JARDIR}/${DESTJARFILE}
    @${ECHO} " [ DONE ]"

.if !defined(NOPORTDOCS)
    @${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
    @${MKDIR} ${DOCSDIR}
    @${CP} -r ${WRKSRC}/target/docs/apidocs ${DOCSDIR}/
    @${CP} -r ${WRKSRC}/LICENSE.txt ${DOCSDIR}/
    @${ECHO} " [ DONE ]"
.endif

.include <bsd.port.mk>