summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose V Beneyto <joberui@ei.upv.es>2007-05-15 02:09:31 +0200
committerJose V Beneyto <joberui@ei.upv.es>2007-05-15 02:10:34 +0200
commit6e23beccfb08257d38762ccc799a3621bacb743e (patch)
tree9f91f51fa89e82bf8f79fa0c19429b4188c06228
parentc4aab2075647bbe4a7e68a1ec11ca0e70986c698 (diff)
downloadcontrib-6e23beccfb08257d38762ccc799a3621bacb743e.tar.gz
contrib-6e23beccfb08257d38762ccc799a3621bacb743e.tar.xz
mldonkey: Updated to 2.8.5 and ported to be used as daemon.
-rw-r--r--mldonkey/Pkgfile19
-rw-r--r--mldonkey/README13
-rw-r--r--mldonkey/mlnetd24
-rwxr-xr-xmldonkey/post-install13
4 files changed, 60 insertions, 9 deletions
diff --git a/mldonkey/Pkgfile b/mldonkey/Pkgfile
index 5f5a9993f..dbb35889f 100644
--- a/mldonkey/Pkgfile
+++ b/mldonkey/Pkgfile
@@ -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}
}
diff --git a/mldonkey/README b/mldonkey/README
new file mode 100644
index 000000000..d39a231e4
--- /dev/null
+++ b/mldonkey/README
@@ -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
diff --git a/mldonkey/mlnetd b/mldonkey/mlnetd
new file mode 100644
index 000000000..81bbf1367
--- /dev/null
+++ b/mldonkey/mlnetd
@@ -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
diff --git a/mldonkey/post-install b/mldonkey/post-install
new file mode 100755
index 000000000..d3320ae9c
--- /dev/null
+++ b/mldonkey/post-install
@@ -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

Generated by cgit