1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

o Add a rc.d startup script

o Bump PORTREVISION
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2005-10-10 16:38:19 +00:00
parent 68d1988f79
commit 196f0c7bb0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=144843
7 changed files with 195 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= mldonkey
PORTVERSION= 2.6.4
PORTREVISION= 1
CATEGORIES+= net
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -22,6 +23,7 @@ CONFLICTS= mldonkey-[0-9]*
USE_BZIP2= yes
USE_ICONV= yes
USE_RC_SUBR= yes
WANT_AUTOCONF_VER= 259
USE_REINPLACE= yes
GNU_CONFIGURE= yes
@ -113,6 +115,9 @@ post-patch:
@${REINPLACE_CMD} -E \
-e 's|%%AUTOCONF%%|${AUTOCONF}|' \
${BUILD_WRKSRC}/config/Makefile.in
# rc.d
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" \
${FILESDIR}/mlnet.sh > ${WRKDIR}/mlnet.sh
pre-configure:
cd ${WRKSRC}/config && ${AUTOCONF}
@ -154,6 +159,9 @@ do-install:
@${INSTALL_DATA} ${WRKSRC}/distrib/${file} ${DOCSDIR}
.endfor
.endif
# rc.d
@${INSTALL_SCRIPT} ${WRKDIR}/mlnet.sh \
${PREFIX}/etc/rc.d
post-install:
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,59 @@
#!/bin/sh
#
# $FreeBSD$
#
# Under a BSDL license. Copyright 2005. Mario S F Ferreira <lioux@FreeBSD.org>
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable mlnet:
#
#mlnet_enable="YES"
#mlnet_user=""
#mlnet_logfile=""
#
. /etc/rc.subr
name="mlnet"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/mlnet"
procname="%%PREFIX%%/bin/mlnet-real"
## hardcoded, cannot override
mlnet_pidfile="${HOME}/.mldonkey/mlnet.pid"
mlnet_check_vars()
{
if [ -z "${mlnet_user}" ]; then
mlnet_user=$(whoami)
fi
if [ "x${mlnet_user}" = "xroot" ]; then
err 1 "You have to set mlnet_user to a non-root user for security reasons"
fi
}
start_cmd="start_cmd"
start_cmd()
{
mlnet_check_vars
if [ -n "${mlnet_logfile}" ]; then
mlnet_logcommand="-log_file ${mlnet_logfile}"
fi
su -l ${mlnet_user} -c "${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>/dev/null &"
}
load_rc_config "${name}"
: ${mlnet_enable="NO"}
: ${mlnet_user=""}
: ${mlnet_logfile=""}
run_rc_command "$1"

View File

@ -0,0 +1,59 @@
#!/bin/sh
#
# $FreeBSD$
#
# Under a BSDL license. Copyright 2005. Mario S F Ferreira <lioux@FreeBSD.org>
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable mlnet:
#
#mlnet_enable="YES"
#mlnet_user=""
#mlnet_logfile=""
#
. /etc/rc.subr
name="mlnet"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/mlnet"
procname="%%PREFIX%%/bin/mlnet-real"
## hardcoded, cannot override
mlnet_pidfile="${HOME}/.mldonkey/mlnet.pid"
mlnet_check_vars()
{
if [ -z "${mlnet_user}" ]; then
mlnet_user=$(whoami)
fi
if [ "x${mlnet_user}" = "xroot" ]; then
err 1 "You have to set mlnet_user to a non-root user for security reasons"
fi
}
start_cmd="start_cmd"
start_cmd()
{
mlnet_check_vars
if [ -n "${mlnet_logfile}" ]; then
mlnet_logcommand="-log_file ${mlnet_logfile}"
fi
su -l ${mlnet_user} -c "${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>/dev/null &"
}
load_rc_config "${name}"
: ${mlnet_enable="NO"}
: ${mlnet_user=""}
: ${mlnet_logfile=""}
run_rc_command "$1"

View File

@ -1,3 +1,4 @@
etc/rc.d/mlnet.sh
%%CORE%%bin/kill_mldonkey
%%CORE%%bin/mlnet
%%CORE%%bin/mlnet-real

View File

@ -7,6 +7,7 @@
PORTNAME= mldonkey
PORTVERSION= 2.6.4
PORTREVISION= 1
CATEGORIES+= net
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -22,6 +23,7 @@ CONFLICTS= mldonkey-[0-9]*
USE_BZIP2= yes
USE_ICONV= yes
USE_RC_SUBR= yes
WANT_AUTOCONF_VER= 259
USE_REINPLACE= yes
GNU_CONFIGURE= yes
@ -113,6 +115,9 @@ post-patch:
@${REINPLACE_CMD} -E \
-e 's|%%AUTOCONF%%|${AUTOCONF}|' \
${BUILD_WRKSRC}/config/Makefile.in
# rc.d
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" \
${FILESDIR}/mlnet.sh > ${WRKDIR}/mlnet.sh
pre-configure:
cd ${WRKSRC}/config && ${AUTOCONF}
@ -154,6 +159,9 @@ do-install:
@${INSTALL_DATA} ${WRKSRC}/distrib/${file} ${DOCSDIR}
.endfor
.endif
# rc.d
@${INSTALL_SCRIPT} ${WRKDIR}/mlnet.sh \
${PREFIX}/etc/rc.d
post-install:
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,59 @@
#!/bin/sh
#
# $FreeBSD$
#
# Under a BSDL license. Copyright 2005. Mario S F Ferreira <lioux@FreeBSD.org>
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable mlnet:
#
#mlnet_enable="YES"
#mlnet_user=""
#mlnet_logfile=""
#
. /etc/rc.subr
name="mlnet"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/mlnet"
procname="%%PREFIX%%/bin/mlnet-real"
## hardcoded, cannot override
mlnet_pidfile="${HOME}/.mldonkey/mlnet.pid"
mlnet_check_vars()
{
if [ -z "${mlnet_user}" ]; then
mlnet_user=$(whoami)
fi
if [ "x${mlnet_user}" = "xroot" ]; then
err 1 "You have to set mlnet_user to a non-root user for security reasons"
fi
}
start_cmd="start_cmd"
start_cmd()
{
mlnet_check_vars
if [ -n "${mlnet_logfile}" ]; then
mlnet_logcommand="-log_file ${mlnet_logfile}"
fi
su -l ${mlnet_user} -c "${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>/dev/null &"
}
load_rc_config "${name}"
: ${mlnet_enable="NO"}
: ${mlnet_user=""}
: ${mlnet_logfile=""}
run_rc_command "$1"

View File

@ -1,3 +1,4 @@
etc/rc.d/mlnet.sh
%%CORE%%bin/kill_mldonkey
%%CORE%%bin/mlnet
%%CORE%%bin/mlnet-real