aboutsummaryrefslogtreecommitdiffstats
path: root/databases/java-db/Makefile
blob: 4a1de2ac7eb7d28cbc758c168c1a4577449c71c1 (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
# ex:ts=8
# Ports collection makefile for:    Berkeley DB Java Edition
# Date created:         Sep 18, 2006
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   db
PORTVERSION=    3.0.12
CATEGORIES= databases java
MASTER_SITES=   http://downloads.sleepycat.com/ \
        ftp://ftp.sleepycat.com/releases/
PKGNAMEPREFIX=  java-
DISTNAME=   je-${PORTVERSION}

MAINTAINER= ijliao@FreeBSD.org
COMMENT=    Berkeley DB Java Edition

BUILD_DEPENDS=  ${JAVAJARDIR}/junit.jar:${PORTSDIR}/java/junit

USE_JAVA=   yes
JAVA_VERSION=   1.4+
USE_ANT=    yes

PLIST_FILES=    ${JAVAJARDIR:S,^${PREFIX}/,,}/je.jar

.if !defined(NOPORTDOCS)
DOCSDIR=    ${TARGETDIR}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR=    ${TARGETDIR}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
PORTDOCS=   *
.endif

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} "s,/usr/local,${TARGETDIR}," ${WRKSRC}/build.xml

do-install:
    @${INSTALL_DATA} ${WRKSRC}/lib/je.jar ${JAVAJARDIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${CP} -R ${WRKSRC}/docs/ ${DOCSDIR}
    @${MKDIR} ${EXAMPLESDIR}
    @${CP} -R ${WRKSRC}/examples/ ${EXAMPLESDIR}

post-install:
    @${FIND} ${EXAMPLESDIR} ! -type d | \
        ${SED} -e "s,^${PREFIX}/,," >> ${TMPPLIST}
    @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
        ${SED} -e "s,^${PREFIX}/,@dirrm ," >> ${TMPPLIST}
.endif

.include <bsd.port.post.mk>