summaryrefslogtreecommitdiffstats
path: root/net/i2p
diff options
context:
space:
mode:
Diffstat (limited to 'net/i2p')
-rw-r--r--net/i2p/Makefile102
-rw-r--r--net/i2p/distinfo2
-rw-r--r--net/i2p/files/patch-installer::resources::clients.config10
-rw-r--r--net/i2p/files/wrapper.sh70
-rw-r--r--net/i2p/pkg-descr14
5 files changed, 198 insertions, 0 deletions
diff --git a/net/i2p/Makefile b/net/i2p/Makefile
new file mode 100644
index 0000000..b9f4e00
--- /dev/null
+++ b/net/i2p/Makefile
@@ -0,0 +1,102 @@
+# New ports collection makefile for: i2p
+# Date created: Sun Jan 9 05:05:02 UTC 2005
+# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= i2p
+PORTVERSION= 0.4.2.6
+CATEGORIES= net java security
+MASTER_SITES= http://dev.i2p.net/i2p/
+
+MAINTAINER= lioux@FreeBSD.org
+COMMENT= An anonymous network
+
+RUN_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
+
+USE_BZIP2= yes
+USE_REINPLACE= yes
+
+USE_JAVA= yes
+JAVA_VERSION= 1.4
+JAVA_OS= native
+USE_ANT= yes
+
+ALL_TARGET= \
+ updater \
+ tarball
+
+.ifndef(NOPORTDOCS)
+ALL_TARGET+= javadoc
+.endif
+
+JAVADOC_WRKSRC= ${WRKSRC}/build/javadoc
+WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:S/./_/g}
+
+DOC_FILES= \
+ readme.html \
+ allclasses-frame.html \
+ allclasses-noframe.html \
+ constant-values.html \
+ deprecated-list.html \
+ help-doc.html \
+ index.html \
+ overview-frame.html \
+ overview-summary.html \
+ overview-tree.html \
+ package-list \
+ packages.html \
+ serialized-form.html \
+ stylesheet.css
+DOC_DIRS= \
+ freenet/ \
+ index-files/ \
+ net/ \
+ resources/
+PORTDOCS= ${DOC_FILES} \
+ ${DOC_DIRS}
+
+PLIST_DIRS= \
+ %%DATADIR%%
+PLIST_FILES= \
+ sbin/i2prouter \
+ %%DATADIR%%/i2p.tar.bz2 \
+ %%DATADIR%%/i2pupdate.zip
+
+post-patch:
+ @${SED} \
+ -e "s|%%DATADIR%%|${DATADIR}|" \
+ ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh
+# postinstall.sh SHOULD only do post installation house keeping
+ @${REINPLACE_CMD} -E \
+ -e 's|./i2prouter[[:space:]]+start||' \
+ ${WRKSRC}/installer/resources/postinstall.sh
+
+do-install:
+ @${MKDIR} ${DATADIR}
+# install
+ @${INSTALL_DATA} ${WRKSRC}/i2p.tar.bz2 \
+ ${DATADIR}/
+# update
+ @${INSTALL_DATA} ${WRKSRC}/i2pupdate.zip \
+ ${DATADIR}/
+# wrapper
+ @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh \
+ ${PREFIX}/sbin/i2prouter
+# doc
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/readme.html ${DOCSDIR}
+.for doc in ${DOC_FILES}
+ @if [ -f ${JAVADOC_WRKSRC}/${doc} ]; then \
+ ${INSTALL_DATA} ${JAVADOC_WRKSRC}/${doc} ${DOCSDIR} ; \
+ fi
+.endfor
+# line taken from textproc/xerces-j maintained by hq@FreeBSD.org
+ @cd ${JAVADOC_WRKSRC} && \
+ ${FIND} ${DOC_DIRS} -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
+ ${FIND} ${DOC_DIRS} -not -type d -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
+.endif
+
+.include <bsd.port.mk>
diff --git a/net/i2p/distinfo b/net/i2p/distinfo
new file mode 100644
index 0000000..3ad863e
--- /dev/null
+++ b/net/i2p/distinfo
@@ -0,0 +1,2 @@
+MD5 (i2p-0.4.2.6.tar.bz2) = c7f203a1c2a47368a21fbdc650dca6b7
+SIZE (i2p-0.4.2.6.tar.bz2) = 4658313
diff --git a/net/i2p/files/patch-installer::resources::clients.config b/net/i2p/files/patch-installer::resources::clients.config
new file mode 100644
index 0000000..dfabaa7
--- /dev/null
+++ b/net/i2p/files/patch-installer::resources::clients.config
@@ -0,0 +1,10 @@
+--- installer/resources/clients.config.orig Mon Jan 10 18:50:30 2005
++++ installer/resources/clients.config Mon Jan 10 18:50:35 2005
+@@ -21,7 +21,3 @@
+ clientApp.3.delay=30
+
+ # load a browser pointing at the web console whenever we start up
+-clientApp.4.main=net.i2p.apps.systray.UrlLauncher
+-clientApp.4.name=consoleBrowser
+-clientApp.4.args=http://localhost:7657/
+-clientApp.4.delay=5
diff --git a/net/i2p/files/wrapper.sh b/net/i2p/files/wrapper.sh
new file mode 100644
index 0000000..a76bf27
--- /dev/null
+++ b/net/i2p/files/wrapper.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# Under a BSDL license. Copyright by Mario S F Ferreira <lioux@FreeBSD.org>
+# $FreeBSD$
+
+DATADIR="%%DATADIR%%"
+#
+I2P_HOME="${HOME}/i2p"
+I2P_RC_SCRIPT=i2prouter
+I2P_POSTINSTALL_SCRIPT=postinstall.sh
+#
+I2P_INSTALL_TARBALL=i2p.tar.bz2
+I2P_UPDATE_ZIP=i2pupdate.zip
+
+if [ -z "${HOME}" -o ! -d "${HOME}" ]; then
+ echo 'ERROR: Please, set HOME environment variable to a valid value!'
+ echo 'ERROR: You may LOSE data if the variable is pointed at an'
+ echo 'ERROR: incorrect location!'
+ exit 1
+fi
+
+case "$1" in
+ restart|start|status|stop)
+ echo "i2p ${1}"
+ if [ -f "${I2P_HOME}/${I2P_RC_SCRIPT}" ]; then
+ case "$1" in
+ restart|start)
+ echo 'To access i2p:'
+ echo 'Point your browser at http://localhost:7657/'
+ ;;
+ esac
+ exec sh "${I2P_HOME}/${I2P_RC_SCRIPT}" ${1}
+ else
+ echo 'ERROR: i2p is not installed'
+ echo 'ERROR: Please install i2p first'
+ exit 2
+ fi
+ ;;
+ install)
+ echo "i2p ${1}"
+ if [ ! -d "${I2P_HOME}" ]; then
+ rm -Rf "${I2P_HOME}"
+ mkdir -p "${I2P_HOME}"
+ fi
+ cd "${HOME}" && \
+ tar -xvjf "${DATADIR}/${I2P_INSTALL_TARBALL}" && \
+ cd "${I2P_HOME}" && \
+ exec sh "${I2P_HOME}/${I2P_POSTINSTALL_SCRIPT}"
+ ;;
+ uninstall)
+ echo "i2p ${1}"
+ exec rm -Rf "${I2P_HOME}"
+ ;;
+ update)
+ echo "i2p ${1}"
+ if [ ! -d "${I2P_HOME}" ]; then
+ echo 'ERROR: i2p is not installed'
+ echo 'ERROR: Please install i2p before trying to update it'
+ exit 3
+ fi
+ cd "${I2P_HOME}" && \
+ exec unzip -o "${DATADIR}/${I2P_UPDATE_ZIP}"
+ ;;
+ *)
+ echo ""
+ echo "Usage: `basename $0` { start | stop | status | restart | install | uninstall | update }"
+ echo ""
+ exit 64
+ ;;
+esac
diff --git a/net/i2p/pkg-descr b/net/i2p/pkg-descr
new file mode 100644
index 0000000..eb49f8d
--- /dev/null
+++ b/net/i2p/pkg-descr
@@ -0,0 +1,14 @@
+[ excerpt from developer's web site ]
+
+I2P is an anonymous network, exposing a simple layer that applications
+can use to anonymously and securely send messages to each other.
+The network itself is strictly message based (ala IP), but there
+is a library available to allow reliable streaming communication
+on top of it (ala TCP). All communication is end to end encrypted
+(in total there are four layers of encryption used when sending a
+message), and even the end points ("destinations") are cryptographic
+identifiers (essentially a pair of public keys).
+
+WWW: http://www.i2p.net/
+
+-- lioux@FreeBSD.org
OpenPOWER on IntegriCloud