aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/freenet/Makefile
blob: 1f936a83a404306a68b7282afb8fdc39acdd821f (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
# New ports collection makefile for:    freenet
# Date created:             Thu May  1 20:19:56 UTC 2003
# Whom:         Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   freenet
PORTVERSION=    0.5.2.1.5102
PORTREVISION=   6
CATEGORIES= net java security
MASTER_SITES=   http://freenetproject.org/snapshots/ \
        http://fgudin.nerim.net/files/
DISTNAME=   ${PORTNAME}-20050526
EXTRACT_SUFX=   .tgz

MAINTAINER= lioux@FreeBSD.org
COMMENT=    Peer-to-peer network aiming at anonymity and freedom of speech

USE_JAVA=   yes
JAVA_VERSION=   1.4+
NO_BUILD=   yes
WRKSRC=     ${WRKDIR}/${PORTNAME}

JAVAVM=     ${LOCALBASE}/bin/java
#
DATA_FILES= seednodes.ref
DOC_FILES=  README
JAR_FILES=  freenet.jar freenet-ext.jar
# jar startup file
JAR_START=  freenet.jar
# seed file
SEED_FILE=  seednodes.ref

PORTDOCS=   ${DOC_FILES}

PLIST_FILES=    \
        bin/${PORTNAME:L} \
        %%DATADIR%%/seednodes.ref \
        %%JAVAJARDIR%%/freenet-ext.jar \
        %%JAVAJARDIR%%/freenet.jar
PLIST_DIRS= %%DATADIR%%

post-patch:
    @${SED} -e "s|%%PREFIX%%|${PREFIX}|; \
        s|%%DATA_DIR%%|${DATADIR:S,^${PREFIX}/,,}|; \
        s|%%JAVA_VERSION%%|${JAVA_VERSION}|; \
        s|%%JAVAVM%%|${JAVAVM}|; \
        s|%%JAVAJARDIR%%|${JAVAJARDIR:S,^${PREFIX}/,,}|; \
        s|%%JAR_FILES%%|${JAR_FILES}|; \
        s|%%JAR_START%%|${JAR_START}|; \
        s|%%SEED_FILE%%|${SEED_FILE}|" \
        ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh

do-install:
# docs
.ifndef(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for doc in ${DOC_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
.endif
# data
    @${MKDIR} ${DATADIR}
.for file in ${DATA_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR}
.endfor
# jar
.for jar in ${JAR_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${jar} ${JAVAJARDIR}
.endfor
# wrapper
    @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME:L}

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

.include <bsd.port.mk>