You are not logged in.
I created PKGBUILD file
# Contributor: Tomasz Bakiera <tbakiera@interia.pl>
pkgname=mldonkey
pkgver=2.5.22
pkgrel=1
pkgdesc="Multiple p2p client"
url="http://mldonkey.org"
license=""
depends=(sysvinit glibc)
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://savannah.nongnu.org/download/mldonkey/$pkgname-$pkgver.tar.gz mldonkeyd)
md5sums=('958ffb63dbcfcb0f6e48788774dfbb42' '0e468234aaad730b39326130fb11c5ac')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr --enable-batch
make || return 1
make prefix=$startdir/pkg/usr install
install -D -m700 ../../mldonkeyd $startdir/pkg/etc/rc.d/mldonkeyd
}
with the file mldonkeyd (based on mysqld script)
#!/bin/bash
MLDONKEY_ROOT="/home/mldonkeyd"
# general config
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/mlnet`
if [ ! `egrep '^mldonkeyd:' /etc/group` ]; then
stat_busy "Adding mldonkeyd group"
groupadd mldonkeyd
stat_done
fi
if [ ! `egrep '^mldonkeyd:' /etc/passwd` ]; then
stat_busy "Adding mldonkeyd user"
useradd -g mldonkeyd -d $MLDONKEY_ROOT -s /bin/sh mldonkeyd
[ -d $MLDONKEY_ROOT ] && chown -R mldonkeyd.mldonkeyd $MLDONKEY_ROOT
stat_done
fi
if [ ! -d $MLDONKEY_ROOT ]; then
stat_busy "Creating mldonkeyd path"
mkdir $MLDONKEY_ROOT
chown -R mldonkeyd.mldonkeyd $MLDONKEY_ROOT
fi
case "$1" in
start)
stat_busy "Starting MLDonkey"
if [ -z "$PID" ]; then
cd $MLDONKEY_ROOT
# Remove tmp files
rm -rf *.tmp
# Run MLDonkey
su mldonkeyd -c "nice -n 19 /usr/bin/mlnet -daemon &> /dev/null"
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
sleep 1 # wait on children
echo `pidof -o %PPID /usr/bin/mlnet` > /var/run/mldonkeyd.pid
add_daemon mldonkeyd
stat_done
fi
else
stat_fail
exit 1
fi
;;#!/bin/bash
MLDONKEY_ROOT="/home/mldonkeyd"
# general config
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/mlnet`
if [ ! `egrep '^mldonkeyd:' /etc/group` ]; then
stat_busy "Adding mldonkeyd group"
groupadd mldonkeyd
stat_done
fi
if [ ! `egrep '^mldonkeyd:' /etc/passwd` ]; then
stat_busy "Adding mldonkeyd user"
useradd -g mldonkeyd -d $MLDONKEY_ROOT -s /bin/sh mldonkeyd
[ -d $MLDONKEY_ROOT ] && chown -R mldonkeyd.mldonkeyd $MLDONKEY_ROOT
stat_done
fi
if [ ! -d $MLDONKEY_ROOT ]; then
stat_busy "Creating mldonkeyd path"
mkdir $MLDONKEY_ROOT
chown -R mldonkeyd.mldonkeyd $MLDONKEY_ROOT
fi
case "$1" in
start)
stat_busy "Starting MLDonkey"
if [ -z "$PID" ]; then
cd $MLDONKEY_ROOT
# Remove tmp files
rm -rf *.tmp
# Run MLDonkey
su mldonkeyd -c "nice -n 19 /usr/bin/mlnet -daemon &> /dev/null"
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
sleep 1 # wait on children
echo `pidof -o %PPID /usr/bin/mlnet` > /var/run/mldonkeyd.pid
add_daemon mldonkeyd
stat_done
fi
else
stat_fail
exit 1
fi
;;
stop)
stat_busy "Stopping MLDonkey"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm /var/run/mldonkeyd.pid &> /dev/null
rm_daemon mldonkeys
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0starting
stop)
stat_busy "Stopping MLDonkey"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm /var/run/mldonkeyd.pid &> /dev/null
rm_daemon mldonkeys
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
What you need is to have a network conection when compiling (caml download needed to compile).
If you add 'mldonkeyd' in /etc/rc.d file (daemons section) it will start with system.
mldonkey startup script creating mldonkeyd user/group with home directory stored
in $MLDONKEY_ROOT (change it if you want) .
Please let me know about errors in this files
--
Tomasz Bakiera, jabber: kog@jabber.wp.pl
http://www.oxiv.net
Offline
mmm, i compile the package and when i try start the daemon, this is the ouput
[root@Celerondomain pkgbuilds]# /etc/rc.d/mldonkeyd
/etc/rc.d/mldonkeyd: line 9: -o: command not found
/etc/rc.d/mldonkeyd: line 10: syntax error near unexpected token `then'
/etc/rc.d/mldonkeyd: line 10: `then'
:?
irc.bsd.cl #linux
irc.freenode.org #archlinux-es
Offline
pkgname=kmldonkey
pkgver=0.10pre4
pkgrel=1
pkgdesc="KMLDonkey is a frontend for MLDonkey, a powerful P2P file sharing
tool, designed for the KDE desktop"
url="http://www.kmldonkey.org/"
depends=('kdelibs' 'qt')
source=(http://savannah.nongnu.org/download/$pkgname/$pkgname-$pkgver.tar.
md5sums=(096a45c5202c7d7aa82b8a868300efde)
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/opt/kde
make || return 1
make prefix=$startdir/pkg/opt/kde install
}
this is a pkgbuild for kmldonkey ( a gui for mldonkey ) , the pkgbuild is based on this post...
http://bbs.archlinux.org/viewtopic.php? … t=mldonkey[/code]
irc.bsd.cl #linux
irc.freenode.org #archlinux-es
Offline
mmm, i compile the package and when i try start the daemon, this is the ouput
[root@Celerondomain pkgbuilds]# /etc/rc.d/mldonkeyd /etc/rc.d/mldonkeyd: line 9: -o: command not found /etc/rc.d/mldonkeyd: line 10: syntax error near unexpected token `then' /etc/rc.d/mldonkeyd: line 10: `then'
:?
I think it is package missing. At the moment not sure which one
is responsible for this error (maybe perl, I'm not developer).
Does anybody know where is the error, on mine system it is working.
Not sure in 100% it is package responsible for 'pidof' command
or something else.
--
Tomasz Bakiera, jabber: kog@jabber.wp.pl
http://www.oxiv.net
Offline
I think I found it
Try to install sysinit package
it means dependencies line should look slike this
depends (sysvinit)
--
Tomasz Bakiera, jabber: kog@jabber.wp.pl
http://www.oxiv.net
Offline
this is working, thanx
irc.bsd.cl #linux
irc.freenode.org #archlinux-es
Offline
I have the following error message while building the mldonked package:
==> ERROR: mldonkeyd was not found in the build directory and is not a proper URL.
==> Aborting...
Offline
problem solved
Offline
problem solved
What was that ??
--
Tomasz Bakiera, jabber: kog@jabber.wp.pl
http://www.oxiv.net
Offline
I didnt had the mldonkeyd script in the build directory.. Sorry very stupid..
Shame on me!
Offline