aboutsummaryrefslogtreecommitdiffstats
path: root/java/jsdk/Makefile
blob: 16ddc2e9255f3f77eb5404c44a5aaa50f8b64582 (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
81
82
83
84
85
86
87
88
# New ports collection makefile for:    Java Servlet Developpers Kit
# Date created:     1999/05/29
# Whom:         Kensaku Masuda <greg@greg.rim.or.jp>
#
# $FreeBSD$
#

PORTNAME=   jsdk
PORTVERSION=    2.0
PORTREVISION=   3
CATEGORIES= java devel
MASTER_SITES=   #
DISTNAME=   jsdk20-solaris2-sparc
EXTRACT_SUFX=   .tar.Z

MAINTAINER= ports@FreeBSD.org
COMMENT=    Sun\'s Java Servlet Developers Kit

RUN_DEPENDS=    java:${PORTSDIR}/java/javavmwrapper

USE_JAVA=   yes
NO_BUILD=   yes

RESTRICTED= "Sun has a funky license for this software; no commercial use"

WRKSRC=     ${WRKDIR}/JSDK2.0

.if defined(BATCH)
IGNORE=     Should be fetched manually
.endif

PLIST_FILES=    %%JAVAJARDIR%%/jsdk.jar bin/servletrunner
.if !defined(NOPORTDOCS)
OTHERDOCS=  apidoc images servlet_tutorial.html
PORTDOCS=   README ${OTHERDOCS}
.endif

do-fetch:
    @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
      ${ECHO_MSG} "=========================================================="; \
      ${ECHO_MSG} " You must a fetch the Java Servlet Development Kit 2.0"; \
      ${ECHO_MSG} " (for Unix) archive from"; \
      ${ECHO_MSG} ""; \
      ${ECHO_MSG} "     http://java.sun.com/products/servlet/archive.html"; \
      ${ECHO_MSG} ""; \
      ${ECHO_MSG} " And copy into ${DISTDIR}"; \
      ${ECHO_MSG} "=========================================================="; \
      ${FALSE}; \
    fi

do-configure:
    @${SED} \
      -e 's,%%JAVAJARDIR%%,${JAVAJARDIR},g' \
      -e 's,%%JAVA_CLASSES%%,${JAVA_CLASSES},g' \
      -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
      ${FILESDIR}/servletrunner > ${WRKSRC}/servletrunner

do-install:
    @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/jsdk.jar..."
    @${MKDIR} ${JAVAJARDIR}
    @${INSTALL_DATA} ${WRKSRC}/lib/jsdk.jar ${JAVAJARDIR}/
    @${ECHO_MSG} " [ DONE ]"
    @${ECHO_MSG} -n ">> Installing script in ${PREFIX}/bin..."
    @${INSTALL_SCRIPT} ${WRKSRC}/servletrunner ${PREFIX}/bin
    @${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
    @${ECHO_MSG} -n ">> Installing samples in ${EXAMPLESDIR}/..."
    @cd ${WRKSRC}/examples/ \
      && ${FIND} . -type d -exec ${MKDIR} ${EXAMPLESDIR}/{} \; \
      && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${EXAMPLESDIR}/{} \;
    @${ECHO_MSG} " [ DONE ]"
    @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}/..."
    @cd ${WRKSRC}/doc/ \
      && ${FIND} ${OTHERDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
      && ${FIND} ${OTHERDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
    @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
    @${ECHO_MSG} " [ DONE ]"
.endif

.if !defined(NOPORTDOCS)
post-install:
    @${FIND} -s ${WRKSRC}/examples -not -type d \
      | ${SED} -ne 's,^${WRKSRC}/examples,${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
    @${FIND} -s -d ${WRKSRC}/examples -type d \
      | ${SED} -ne 's,^${WRKSRC}/examples,@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
.endif

.include <bsd.port.mk>