diff options
author | lioux <lioux@FreeBSD.org> | 2005-10-10 06:18:31 +0000 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2005-10-10 06:18:31 +0000 |
commit | 7fb89ec5292d59abc2816c53394aa861d947d6b8 (patch) | |
tree | a473939b2809a7a224f548eedbd1e4b97dcc2634 /net-p2p/freenet05 | |
parent | e87ed4007b980d566c8e4b9dc9d5dbb2b1b70d6e (diff) | |
download | FreeBSD-ports-7fb89ec5292d59abc2816c53394aa861d947d6b8.zip FreeBSD-ports-7fb89ec5292d59abc2816c53394aa861d947d6b8.tar.gz |
o Update to Freenet Stable build 5105 released 20050930 snapshot
o Bump PORTREVISION since build version did not change
o Add a rc.d startup script [1]
PR: 86023 [1]
Requested by: Evgeniy <dushistov@gmail.com> [1]
Diffstat (limited to 'net-p2p/freenet05')
-rw-r--r-- | net-p2p/freenet05/Makefile | 8 | ||||
-rw-r--r-- | net-p2p/freenet05/distinfo | 4 | ||||
-rw-r--r-- | net-p2p/freenet05/files/freenet.sh | 67 |
3 files changed, 76 insertions, 3 deletions
diff --git a/net-p2p/freenet05/Makefile b/net-p2p/freenet05/Makefile index d32f2a9..fccbff1 100644 --- a/net-p2p/freenet05/Makefile +++ b/net-p2p/freenet05/Makefile @@ -7,10 +7,11 @@ PORTNAME= freenet PORTVERSION= 0.5.2.1.5105 +PORTREVISION= 1 CATEGORIES= net java security MASTER_SITES= http://freenetproject.org/snapshots/ \ http://fgudin.nerim.net/files/ -DISTNAME= ${PORTNAME}-20050911 +DISTNAME= ${PORTNAME}-20050930 EXTRACT_SUFX= .tgz MAINTAINER= lioux@FreeBSD.org @@ -35,6 +36,7 @@ PORTDOCS= ${DOC_FILES} PLIST_FILES= \ bin/${PORTNAME:L} \ + etc/rc.d/${PORTNAME:L}.sh \ %%DATADIR%%/seednodes.ref \ %%JAVAJARDIR%%/freenet-ext.jar \ %%JAVAJARDIR%%/freenet.jar @@ -50,6 +52,8 @@ post-patch: s|%%JAR_START%%|${JAR_START}|; \ s|%%SEED_FILE%%|${SEED_FILE}|" \ ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh + @${SED} -e "s|%%PREFIX%%|${PREFIX}|" \ + ${FILESDIR}/${PORTNAME:L}.sh > ${WRKDIR}/${PORTNAME:L}.sh do-install: # docs @@ -68,6 +72,8 @@ do-install: .for jar in ${JAR_FILES} @${INSTALL_DATA} ${WRKSRC}/${jar} ${JAVAJARDIR} .endfor +# rc.d + @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME:L}.sh ${PREFIX}/etc/rc.d # wrapper @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME:L} diff --git a/net-p2p/freenet05/distinfo b/net-p2p/freenet05/distinfo index ffbb43f..7c6e648 100644 --- a/net-p2p/freenet05/distinfo +++ b/net-p2p/freenet05/distinfo @@ -1,2 +1,2 @@ -MD5 (freenet-20050911.tgz) = 9f4f55d6acd4af606302198f5783f280 -SIZE (freenet-20050911.tgz) = 4700628 +MD5 (freenet-20050930.tgz) = 30e82a4865fa1e8ee209c6aef16b6857 +SIZE (freenet-20050930.tgz) = 5650073 diff --git a/net-p2p/freenet05/files/freenet.sh b/net-p2p/freenet05/files/freenet.sh new file mode 100644 index 0000000..50c1e47 --- /dev/null +++ b/net-p2p/freenet05/files/freenet.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Under a BSDL license. Copyright 2005. Mario S F Ferreira <lioux@FreeBSD.org> + +# PROVIDE: freenet +# REQUIRE: NETWORKING +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable freenet: +# +#freenet_enable="YES" +#freenet_user="" +# + +. /etc/rc.subr + +name="freenet" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/${name}" +extra_commands="configure" + +freenet_check_vars() +{ + if [ -z "${freenet_user}" ]; then + freenet_user=$(whoami) + fi + + if [ "x${freenet_user}" = "xroot" ]; then + err 1 "You have to set freenet_user to a non-root user for security reasons" + fi +} + +configure_cmd="configure_cmd" +configure_cmd() +{ + freenet_check_vars + su -l ${freenet_user} -c "${command} -c" +} + +start_cmd="start_cmd" +start_cmd() +{ + freenet_check_vars + su -l ${freenet_user} -c "${command} -i" +} + +stop_cmd="stop_cmd" +stop_cmd() +{ + freenet_check_vars + su -l ${freenet_user} -c "${command} -o" +} + +status_cmd="status_cmd" +status_cmd() +{ + echo "Can't check ${name} status" +} + +load_rc_config "${name}" +: ${freenet_enable="NO"} +: ${freenet_user=""} + +run_rc_command "$1" |