mldonkey: Updated to 2.8.5 and ported to be used as daemon.

This commit is contained in:
Jose V Beneyto 2007-05-15 02:09:31 +02:00
parent c4aab20756
commit 6e23beccfb
4 changed files with 60 additions and 9 deletions

View File

@ -5,16 +5,17 @@
# Depends on: ocaml
name=mldonkey
version=2.8.3
version=2.8.5
release=1
source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.bz2)
source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.bz2 \
mlnetd)
build() {
cd $name-$version
./configure --prefix=/usr \
--enable-minimum
make
install -d $PKG/usr/bin
install -m 755 mlnet $PKG/usr/bin
ln -sd /usr/bin/mlnet $PKG/usr/bin/$name
cd $name-$version
./configure --prefix=/usr \
--enable-minimum
make
install -D -m 0755 ${SRC}/mlnetd ${PKG}/etc/rc.d/mlnetd
install -D -m 0755 mlnet ${PKG}/usr/bin/mlnet
ln -sf /usr/bin/mlnet ${PKG}/usr/bin/${name}
}

13
mldonkey/README Normal file
View File

@ -0,0 +1,13 @@
README for virtualbox 2.8.5
REQUIREMENTS
PRE-INSTALL
POST-INSTALL
Run the post-install script in order to add a mlusers group to your system.
After that, add your user to the mlusers group:
# usermod -G mlusers <your_user>
PRECAUTIONS

24
mldonkey/mlnetd Normal file
View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# /etc/rc.d/mlnetd: start/stop mldonkey daemon
#
MLDONKEY_USER="mldonkey"
case $1 in
start)
su ${MLDONKEY_USER} -c "/usr/bin/mlnet &>/dev/null &"
;;
stop)
killall -q /usr/bin/mlnet
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
;;
esac
# End of file

13
mldonkey/post-install Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# check for mlusers group or add one if not exists
/usr/bin/getent group mlusers || /usr/sbin/groupadd mlusers
# check for mldonkey user or add one
/usr/bin/getent passwd mldonkey || \
/usr/sbin/useradd -g mlusers -m -d /var/mlnet mldonkey
# lock the account
/usr/bin/passwd -l mldonkey
# End of File