aboutsummaryrefslogtreecommitdiffstats
path: root/databases/sqldeveloper/Makefile
blob: 41c471b3636e2838024c47092d844390b84fac16 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# New ports collection makefile for:    sqldeveloper
# Date created:             16 January 2008
# Whom:                 jjuanino@gmail.com
#
# $FreeBSD$
#

PORTNAME=   sqldeveloper
PORTVERSION=    1.5.0.53.38
DISTVERSIONSUFFIX=-no-jre
PORTREVISION=   1
CATEGORIES= databases java
MASTER_SITES=   #http://www.oracle.com/technology/software/products/sql/index.html
DISTNAME=   ${PORTNAME}-5338${DISTVERSIONSUFFIX}
DIST_SUBDIR=    oracle

MAINTAINER= jjuanino@gmail.com
COMMENT=    Graphical tool for database development

RUN_DEPENDS=    bash:${PORTSDIR}/shells/bash

USE_ZIP=    yes
USE_JAVA=   yes

JAVA_VERSION=   1.5

NO_BUILD=   yes

RESTRICTED= Packaging prohibited by Oracle license

DATADIR=    ${JAVASHAREDIR}/${PORTNAME}
WRKSRC=     ${WRKDIR}/${PORTNAME}
SUB_FILES=  pkg-message

OPTIONS=    MYSQL "Enable connection to MySQL databases" off

.include <bsd.port.pre.mk>

.if defined(WITH_MYSQL)
RUN_DEPENDS+=   ${JAVALIBDIR}/mysql-connector-java.jar:${PORTSDIR}/databases/mysql-connector-java
.endif

.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX})
ECHO_MSG=       ${PRINTF} %b

IGNORE+=        \n\n-=< MARKED AS IGNORED: >=-\n
IGNORE+=        \n
IGNORE+=        Due to Oracle license restrictions, you must fetch the source \n
IGNORE+=        distribution manually.  Please access  \n
IGNORE+=        http://www.oracle.com/technology/software/products/sql/index.html \n
IGNORE+=        with a web browser and follow the link for the \n
IGNORE+=        \"${DISTFILES}\".  \n
IGNORE+=        You will be required to register and log in, \n
IGNORE+=        but you can create an account on that page.  \n
IGNORE+=        After registration and accepting the Oracle License, \n
IGNORE+=        download the distribution file, \n ${DISTFILES}, \n
IGNORE+=        into ${DISTDIR}/${DIST_SUBDIR}/ \n
IGNORE+=        and then restart this installation\n\n
.endif

do-install:
    @${REINPLACE_CMD} -e 's|%DATADIR%|${DATADIR}|' \
              -e 's|%JAVA_HOME%|${JAVA_HOME}|' \
        ${WRKSRC}/sqldeveloper.sh \
        ${WRKSRC}/sqlcli
    @${REINPLACE_CMD} -e 's|/bin/bash|/usr/local/bin/bash|' \
        ${WRKSRC}/sqldeveloper.sh \
        ${WRKSRC}/sqlcli \
        ${WRKSRC}/ide/bin/launcher.sh \
        ${WRKSRC}/ide/bin/product-launcher.template \
        ${WRKSRC}/sqldeveloper/bin/sqldeveloper
    @${ECHO_MSG} -n ">> Installing scripts..."
    @${INSTALL_SCRIPT} ${WRKSRC}/sqldeveloper.sh ${PREFIX}/bin/sqldeveloper
    @${INSTALL_SCRIPT} ${WRKSRC}/sqlcli ${PREFIX}/bin/sqlcli
    @${ECHO_MSG} " [ DONE ]"

.for d in BC4J dvt ide j2ee jdbc jdev jlib lib rdbms sqldeveloper timingframework
    @${ECHO_MSG} -n ">> Installing data directory '${d}'..."
    @cd ${WRKSRC} && ${FIND} ${d} -type d \
        -not -path "jdev/extensions/oracle.jdeveloper.subversion/licenses" \
        -exec ${MKDIR} ${DATADIR}/\{} \;
    @cd ${WRKSRC} && ${FIND} ${d} -type f \
        -not -name "*.orig" \
        -not -name "*.exe" \
        -not -name "*.bat" \
        -not -name "*.bak" \
        -not -name "*.dll" \
        -not -path "jdev/extensions/oracle.jdeveloper.subversion/licenses/*" \
        -exec ${INSTALL_DATA} \{} ${DATADIR}/\{} \;
    @${ECHO_MSG} " [ DONE ]"
.endfor

    @${ECHO_MSG} -n ">> Installing icon ..."
    @${INSTALL_DATA} ${WRKSRC}/icon.png ${DATADIR}/icon.png
    @${ECHO_MSG} " [ DONE ]"

.if !defined(NOPORTDOCS)
    @${ECHO_MSG} -n ">> Installing port docs ..."
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_MAN} ${WRKSRC}/readme.txt ${DOCSDIR}
    @${ECHO_MSG} " [ DONE ]"
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>