aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/mldonkey
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-06-24 15:39:10 +0800
committerpav <pav@FreeBSD.org>2005-06-24 15:39:10 +0800
commit90501ea9920a2fe269d7701d7cbaba138178537c (patch)
treefe2d8039db54a8eb78da807b097d0b8d813288e2 /net-p2p/mldonkey
parentede8a7e2490c776f5b036d177208f8d43c274022 (diff)
downloadfreebsd-ports-gnome-90501ea9920a2fe269d7701d7cbaba138178537c.tar.gz
freebsd-ports-gnome-90501ea9920a2fe269d7701d7cbaba138178537c.tar.zst
freebsd-ports-gnome-90501ea9920a2fe269d7701d7cbaba138178537c.zip
- Update to 2.5.28.1
- Add rc script [1] PR: ports/82467 Submitted by: Jose M Rodriguez <josemi@freebsd.jazztel.es> Approved by: Holger Lamm <holger@e-gitt.net> (maintainer) [1] Submitted by: hq via maintainer
Diffstat (limited to 'net-p2p/mldonkey')
-rw-r--r--net-p2p/mldonkey/Makefile38
-rw-r--r--net-p2p/mldonkey/distinfo6
-rw-r--r--net-p2p/mldonkey/files/kill_mldonkey27
-rw-r--r--net-p2p/mldonkey/files/mlnet.sh61
-rw-r--r--net-p2p/mldonkey/pkg-message2
-rw-r--r--net-p2p/mldonkey/pkg-plist11
6 files changed, 107 insertions, 38 deletions
diff --git a/net-p2p/mldonkey/Makefile b/net-p2p/mldonkey/Makefile
index 3d38ea43bec1..f4698d0a8374 100644
--- a/net-p2p/mldonkey/Makefile
+++ b/net-p2p/mldonkey/Makefile
@@ -6,28 +6,23 @@
#
PORTNAME= mldonkey
-PORTVERSION= 2.5.23
+PORTVERSION= 2.5.28.1
CATEGORIES+= net
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTNAME= ${PORTNAME}-${DOWNLOADVERSION}
-
-PATCH_SITES= http://www.schraegerpunkt.de/
-PATCHFILES= mldonkey-${DOWNLOADVERSION}-${PORTVERSION:C/.+\.//}.patch.gz
MAINTAINER?= holger@e-gitt.net
COMMENT?= A OCAML client for multiple peer-to-peer networks
-BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \
- autoconf213:${PORTSDIR}/devel/autoconf213
-
-DOWNLOADVERSION=2.5.22
+BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
-CONFLICTS= mldonkey-devel-[0-9]* mldonkey-{core,gui}-devel-[0.9]*
+CONFLICTS= mldonkey-devel-[0-9]*
+USE_BZIP2= yes
+WANT_AUTOCONF_VER= 259
+USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-pthread --enable-ocamlver=3
-WRKSRC= ${WRKDIR}/${PORTNAME}-${DOWNLOADVERSION}
USE_GMAKE= yes
ALL_TARGET= depend opt
@@ -38,9 +33,16 @@ ALL_TARGET= depend opt
# have no 'without-' flag
CONFIGURE_ARGS+=--disable-gui
PLIST_SUB+= CORE="" GUI="@comment " GUICORE="@comment "
+CONFLICTS+= mldonkey-core-devel-[0.9]* mldonkey-core-stable-[0.9]* \
+ mldonkey-[0-9]*
PKGNAMESUFFIX= -core
.else
PLIST_SUB+= GUI=""
+CONFLICTS+= mldonkey-gui-devel-[0.9]*
+.if !defined(WITHOUT_CORE)
+CONFLICTS+= mldonkey-[0-9]*
+USE_RC_SUBR= yes
+.endif
BUILD_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk \
${LOCALBASE}/lib/ocaml/jabbr.cma:${PORTSDIR}/net/ocaml-jabbr
# we don't need lablgtk as RUN dependency, but we need gtk+glib
@@ -55,6 +57,8 @@ PLIST_SUB+= CORE="" GUICORE=""
DOCFILES= Authors.txt Bugs.txt ChangeLog Developers.txt FAQ.html \
Install.txt Readme.txt Todo.txt ed2k_links.txt
+PORTDOCS= ${DOCFILES}
+PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
@@ -68,14 +72,26 @@ pre-configure:
@cd ${WRKSRC}/config && ${AUTOCONF}
post-patch:
+.ifndef(WITHOUT_CORE)
+ @${SED} -e "s|%%PREFIX%%|${PREFIX}|g ; s|%%RC_SUBR%%|${RC_SUBR}|g ; s|%%LOCALBASE%%|${LOCALBASE}|g" ${FILESDIR}/mlnet.sh > \
+ ${WRKDIR}/mlnet.sh
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${FILESDIR}/wrapper.sh > \
${WRKDIR}/wrapper.sh
+.endif
+ ${REINPLACE_CMD} -E \
+ -e 's|%%AUTOCONF%%|${AUTOCONF}|' \
+ ${BUILD_WRKSRC}/config/Makefile.in
+
+post-build:
+ @${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
+ < ${.CURDIR}/pkg-message > ${PKGMESSAGE}
do-install:
.ifndef(WITHOUT_CORE)
@${INSTALL_PROGRAM} ${WRKSRC}/mlnet ${PREFIX}/bin/mlnet-real
@${INSTALL_SCRIPT} ${FILESDIR}/kill_mldonkey ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/mlnet
+ @${INSTALL_SCRIPT} ${WRKDIR}/mlnet.sh ${PREFIX}/etc/rc.d
.endif
.ifndef(WITHOUT_GUI)
@${INSTALL_PROGRAM} ${WRKSRC}/mlchat ${PREFIX}/bin
diff --git a/net-p2p/mldonkey/distinfo b/net-p2p/mldonkey/distinfo
index 5561d6c3ebf4..9318eb9e2f45 100644
--- a/net-p2p/mldonkey/distinfo
+++ b/net-p2p/mldonkey/distinfo
@@ -1,4 +1,2 @@
-MD5 (mldonkey-2.5.22.tar.gz) = 958ffb63dbcfcb0f6e48788774dfbb42
-SIZE (mldonkey-2.5.22.tar.gz) = 3474104
-MD5 (mldonkey-2.5.22-23.patch.gz) = 091c77f0dd29be7443ac62e99cc41dc0
-SIZE (mldonkey-2.5.22-23.patch.gz) = 88210
+MD5 (mldonkey-2.5.28.1.tar.bz2) = 4f24b2e1eeac4b54151ca2473ade45ec
+SIZE (mldonkey-2.5.28.1.tar.bz2) = 2791684
diff --git a/net-p2p/mldonkey/files/kill_mldonkey b/net-p2p/mldonkey/files/kill_mldonkey
index 17a7de100aad..71c40bc1ac83 100644
--- a/net-p2p/mldonkey/files/kill_mldonkey
+++ b/net-p2p/mldonkey/files/kill_mldonkey
@@ -1,4 +1,7 @@
+#!/bin/sh
#
+# $FreeBSD$
+
# Copyright (c) 2003
# Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
# Holger Lamm <holger@e-gitt.net>
@@ -26,26 +29,26 @@
# SUCH DAMAGE.
#
-#!/bin/sh
-
#
# Add Username and password here
# like this:
#
-HTTPUSER="you"
-HTTPPASS="yourpassword"
-
-# Add location and port of mldonkey core
-HTTPURL="127.0.0.1:4080"
+#MLNETUSER="admin"
+#MLNETPASS=""
+#MLNETHOST="127.0.0.1"
+#MLNETPORT="4080"
# internal configuration
HTTP_COMMAND="/usr/bin/fetch"
-HTTP_COMMAND_ARGS="-1 -q -s"
+HTTP_COMMAND_ARGS="-1 -q -s -o /dev/null"
-if [ -n "${HTTPUSER}" -a -n "${HTTPPASS}" ]
-then
- export HTTP_AUTH=basic:*:${HTTPUSER}:${HTTPPASS}
+if [ -n "${MLNETPASS}" ]; then
+ export HTTP_AUTH=basic:*:${MLNETUSER:-admin}:${MLNETPASS}
fi
-${HTTP_COMMAND} ${HTTP_COMMAND_ARGS} "http://${HTTPURL}/submit?q=kill"
+exec > /dev/null 2>&1
+
+${HTTP_COMMAND} ${HTTP_COMMAND_ARGS} \
+ "http://${MLNETHOST:-127.0.0.1}:${MLNETPORT:-4080}/submit?q=kill" \
+ 2>&1 > /dev/null
diff --git a/net-p2p/mldonkey/files/mlnet.sh b/net-p2p/mldonkey/files/mlnet.sh
new file mode 100644
index 000000000000..41a0b866eae8
--- /dev/null
+++ b/net-p2p/mldonkey/files/mlnet.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: mlnet
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+mlnet_enable=${mlnet_enable:-"NO"}
+mlnet_http_port=${mlnet_http_port:-"4080"}
+mlnet_logfile=${mlnet_logfile:-"/var/log/mlnet"}
+
+. %%RC_SUBR%%
+
+name=mlnet
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/${name}"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+mlnet_conf="%%PREFIX%%/etc/mlnet.conf"
+required_files="${mlnet_conf}"
+mlnet_user=${mlnet_user:-"mlnet"}
+
+if [ -r ${mlnet_conf} ] ; then
+ . ${mlnet_conf}
+fi
+
+mlnet_url="http://"
+if [ -n "${mlnet_http_user}" -a -n "${mlnet_http_password}" ] ; then
+ mlnet_url="${mlnet_url}${mlnet_http_user}:${mlnet_http_password}@"
+fi
+mlnet_url="${mlnet_url}localhost:${mlnet_http_port}"
+
+mlnet_start() {
+ if checkyesno mlnet_enable ; then
+ echo -n " mlnet"
+ su ${mlnet_user} -c "${command} \
+ ${mlnet_flags} \
+ -daemon \
+ -http_port ${mlnet_http_port}" \
+ >>${mlnet_logfile} 2>&1
+ fi
+}
+
+mlnet_stop() {
+ if checkyesno mlnet_enable ; then
+ echo -n " mlnet"
+ %%LOCALBASE%%/bin/wget --spider -q \
+ "${mlnet_url}/submit?q=close_fds" \
+ >>${mlnet_logfile} 2>&1
+ %%LOCALBASE%%/bin/wget --spider -q \
+ "${mlnet_url}/submit?q=save" \
+ >>${mlnet_logfile} 2>&1
+ %%LOCALBASE%%/bin/wget --spider -q \
+ "${mlnet_url}/submit?q=kill" \
+ >>${mlnet_logfile} 2>&1
+ fi
+}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/net-p2p/mldonkey/pkg-message b/net-p2p/mldonkey/pkg-message
index 9ec1ee80b84c..9758a622b676 100644
--- a/net-p2p/mldonkey/pkg-message
+++ b/net-p2p/mldonkey/pkg-message
@@ -1,7 +1,7 @@
ATTENTIONATTENTION:
- If you want to know how to use mldonkey, read "INSTALL" or
- "FAQ.html" in the port docs (/usr/local/share/doc/mldonkey)
+ "FAQ.html" in the port docs (%%DOCSDIR%%)
- It is not a bad idea to install mplayer. You will be able
to preview half-downloaded files (if you have the beginning).
diff --git a/net-p2p/mldonkey/pkg-plist b/net-p2p/mldonkey/pkg-plist
index 46567757a145..aa2b970a4402 100644
--- a/net-p2p/mldonkey/pkg-plist
+++ b/net-p2p/mldonkey/pkg-plist
@@ -1,19 +1,10 @@
%%CORE%%bin/kill_mldonkey
%%CORE%%bin/mlnet
%%CORE%%bin/mlnet-real
+%%CORE%%etc/rc.d/mlnet.sh
%%GUICORE%%bin/mlguistarter
%%GUICORE%%bin/mldonkey_previewer
%%GUICORE%%bin/mlnet+gui
%%GUI%%bin/mlchat
%%GUI%%bin/mlgui
%%GUI%%bin/mlim
-%%PORTDOCS%%share/doc/mldonkey/Authors.txt
-%%PORTDOCS%%share/doc/mldonkey/Bugs.txt
-%%PORTDOCS%%share/doc/mldonkey/ChangeLog
-%%PORTDOCS%%share/doc/mldonkey/Developers.txt
-%%PORTDOCS%%share/doc/mldonkey/FAQ.html
-%%PORTDOCS%%share/doc/mldonkey/Install.txt
-%%PORTDOCS%%share/doc/mldonkey/Readme.txt
-%%PORTDOCS%%share/doc/mldonkey/Todo.txt
-%%PORTDOCS%%share/doc/mldonkey/ed2k_links.txt
-%%PORTDOCS%%@dirrm share/doc/mldonkey