aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/vuze/Makefile
blob: 53e32141edd7eee2435a701e0fefa872f4bc4597 (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
108
109
110
111
112
# New ports collection makefile for:    Azureus
# Date created:             October 6, 2004
# Whom:                 Jeremy Faulkner <gldisater@gldis.ca>
#
# $FreeBSD$
#

PORTNAME=   vuze
PORTVERSION=    4.7.0.0
CATEGORIES= net-p2p java
# Moved to x-obsolete, could do with an update
MASTER_SITES=   SF/azureus/vuze/Vuze_${PORTVERSION:S/.//g}
DISTNAME=   Vuze_${PORTVERSION:S/.//g}_source

MAINTAINER= ports@FreeBSD.org
COMMENT=    A BitTorrent client written in Java

BUILD_DEPENDS=  ${JAVALIBDIR}/log4j.jar:${PORTSDIR}/devel/log4j \
        ${JAVALIBDIR}/commons-cli.jar:${PORTSDIR}/java/jakarta-commons-cli \
        ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit

USE_JAVA=   yes
JAVA_VERSION=   1.5+
JAVA_OS=    native
USE_ANT=    yes

USE_ZIP=    yes

#USE_DOS2UNIX=  \
#org/gudy/azureus2/platform/macosx/access/jnilib/OSXAccess.java \
#org/gudy/azureus2/platform/unix/ScriptBeforeStartup.java \
#org/gudy/azureus2/platform/PlatformManagerFactory.java \
#org/gudy/azureus2/ui/swt/test/PrintTransferTypes.java \
#org/gudy/azureus2/ui/swt/views/table/impl/TableViewSWTImpl.java \
#com/aelitis/azureus/core/networkmanager/impl/TransportHelperFilterStream.java \
#com/aelitis/azureus/core/networkmanager/impl/TransportHelperFilterTransparent.java

USE_GECKO=  libxul

NO_WRKSUBDIR=   yes

JARFILE=    ${PORTNAME}.jar

OPTIONS=    SWTDEVEL "Use SWT Development port" on

# build classpath from BUILD_DEPENDS
MAKE_ENV=   LANG=C
CLASSPATH_JARS= ${BUILD_DEPENDS:C/:.+$//:M*.jar}

PLIST_FILES=    %%JAVAJARDIR%%/${JARFILE} \
        bin/${PORTNAME} \
        share/icons/hicolor/16x16/apps/${PORTNAME}.png \
        share/icons/hicolor/32x32/apps/${PORTNAME}.png \
        share/icons/hicolor/64x64/apps/${PORTNAME}.png

SUB_FILES=  ${PORTNAME}
SUB_LIST=   LIBDIR="${LOCALBASE}/lib" JARFILE="${JARFILE}" \
        SWTJAR="${JAVALIBDIR}/${SWT}.jar" JAVA="${LOCALBASE}/bin/java" \
        GECKO="${GECKO}"

DESKTOP_ENTRIES=    "Vuze" \
            "A full feature BitTorrent client" \
            "${PORTNAME}.png" \
            "${PORTNAME}" \
            "Application;Network;P2P;" \
            true

INSTALLS_ICONS=     yes

.include <bsd.port.pre.mk>

.if defined(WITH_SWTDEVEL)
SWT=        swt-devel
BUILD_DEPENDS+= ${JAVALIBDIR}/swt-devel.jar:${PORTSDIR}/x11-toolkits/swt-devel
RUN_DEPENDS+=   ${JAVALIBDIR}/swt-devel.jar:${PORTSDIR}/x11-toolkits/swt-devel
.else
SWT=        swt
BUILD_DEPENDS+= ${JAVALIBDIR}/swt.jar:${PORTSDIR}/x11-toolkits/swt
RUN_DEPENDS+=   ${JAVALIBDIR}/swt.jar:${PORTSDIR}/x11-toolkits/swt
.endif

CLASSPATH=.
.for jar in ${CLASSPATH_JARS}
CLASSPATH:=${CLASSPATH}:${jar}
.endfor

post-patch:
    ${RM} -rf ${WRKSRC}/org/eclipse
    @${SED} -E -e 's|%%CLASSPATH%%|${CLASSPATH}|' \
        ${FILESDIR}/build.xml > ${WRKSRC}/build.xml
# bash -> sh
    @${REINPLACE_CMD} -E -e 's|/bin/bash|${SH}|' \
        ${WRKSRC}/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java

do-install:
    ${MKDIR} ${JAVAJARDIR}
    ${INSTALL_DATA} ${WRKSRC}/dist/lib/${JARFILE} ${JAVAJARDIR}
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
    ${MKDIR} ${PREFIX}/share/icons/hicolor/16x16/apps
    ${INSTALL_DATA} ${WRKDIR}/org/gudy/azureus2/ui/icons/a16.png \
        ${PREFIX}/share/icons/hicolor/16x16/apps/${PORTNAME}.png
    ${MKDIR} ${PREFIX}/share/icons/hicolor/32x32/apps
    ${INSTALL_DATA} ${WRKDIR}/org/gudy/azureus2/ui/icons/a32.png \
        ${PREFIX}/share/icons/hicolor/32x32/apps/${PORTNAME}.png
    ${MKDIR} ${PREFIX}/share/icons/hicolor/64x64/apps
    ${INSTALL_DATA} ${WRKDIR}/org/gudy/azureus2/ui/icons/a64.png \
        ${PREFIX}/share/icons/hicolor/64x64/apps/${PORTNAME}.png

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

.include <bsd.port.post.mk>