aboutsummaryrefslogtreecommitdiffstats
path: root/java/junit/Makefile
blob: 0da3334fefade82f458151e195a0fd4aff9f5d19 (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
# New ports collection makefile for:    JUnit
# Date created:     Jun 15 1999
# Whom:         OKAZAKI Tetsurou
#
# $FreeBSD$
#

PORTNAME=   junit
PORTVERSION=    3.8.2
CATEGORIES= java devel
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME=   ${PORTNAME}${PORTVERSION}

MAINTAINER= hq@FreeBSD.org
COMMENT=    A regression testing utility for use with the Java(TM) Language

USE_ZIP=    yes
USE_JAVA=   yes
NO_BUILD=   yes

.include <bsd.port.pre.mk>

.if ${JAVA_PORT_VERSION} == "1.1"
RUN_DEPENDS+=   ${JAVALIBDIR}/jfc-1.1.1/swing.jar:${PORTSDIR}/java/jfc
.endif

.if !defined(NOPORTDOCS)
PORTDOCS=   README.html cpl-v10.html doc javadoc
.endif
DATADIR=    ${JAVASHAREDIR}/${PORTNAME}
PLIST_FILES=    %%JAVAJARDIR%%/junit.jar %%DATADIR%%/src.jar
PLIST_DIRS= %%DATADIR%%

do-install:
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/junit.jar ${JAVAJARDIR}/
    ${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/src.jar ${DATADIR}/
    cd ${INSTALL_WRKSRC}/junit/samples \
      && ${FIND} . -type d -exec ${MKDIR} ${EXAMPLESDIR}/\{} \; \
      && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${EXAMPLESDIR}/\{} \;
.if !defined(NOPORTDOCS)
    cd ${INSTALL_WRKSRC} \
      && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/\{} \; \
      && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \;
.endif

post-install:
    @cd ${INSTALL_WRKSRC}/junit/samples \
      && ${FIND} -s . -type f \
        | ${SED} 's,^\.,${EXAMPLESDIR:S,^${PREFIX}/,,},' >>${TMPPLIST} \
      && ${FIND} -s -d . -type d \
        | ${SED} 's,^\.,@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,},' >>${TMPPLIST}

.include <bsd.port.post.mk>