aMule Forum

English => Distro-Specific Packages => Packages for development versions => Topic started by: dreamerwolf on March 16, 2009, 01:09:07 AM

Title: Debian SVN build script
Post by: dreamerwolf on March 16, 2009, 01:09:07 AM
You could download from my repository (it may not the newest)
Code: [Select]
wget http://twemu.no-ip.org/apt/public.pgp
sudo -s
apt-key add public.pgp
echo 'deb http://twemu.no-ip.org/apt/ ./' >> /etc/apt/sources.list
echo 'deb-src http://twemu.no-ip.org/apt/ ./' >> /etc/apt/sources.list
or build yourself.
Code: [Select]
#!/bin/bash
# This program is follow GPL Version 2 .
URL=http://amule.sourceforge.net/tarballs/tarballs.xml
LOG=$(date +%F).log

if [ -f url ] ; then
    R=$(cat url)
else
    R=0
fi

echo "Testing..."
wget $URL -O- 2>>$LOG |grep youngest|sed -n "s/^.*youngest='\(.*\)'.*$/\1/p" > url 2>>$LOG

URL2=http://amule.sourceforge.net/tarballs/aMule-SVN-r$(cat url).tar.bz2

if [ $R == $(cat url) ] ; then
    echo "There is no update, and it won't start to download."
else
    echo 'Start to download'
    wget $URL2 2>>$LOG -O daily.tar.bz2 -t 3
fi
echo "End Download"

tar xvf daily.tar.bz2

if [ -d aMule-SVN-r$(cat url) ] ; then
    cd aMule-SVN-r$(cat url)
    mv aMule-SVN-r$(cat url)/debian aMule-SVN-r$(cat url)/debian.upstream
    if [ -f daily.tar.gz ] ; then
        rm daily.tar.gz
    fi
    tar czvf daily.tar.gz aMule-SVN-r$(cat url)
    rm -rf aMule-SVN-r$(cat url)
fi

apt-get source amule

if [ -d amule-2.2.3 ] ; then
    cd amule-2.2.3
    uupdate ../daily.tar.gz 2.2.3+svnr$(cat ../url)
    cd ..
else
    echo 'error, amule-2.2.3 is missing.'
    exit 0
fi
if [ -d tmp ] ; then
    rm -rf tmp
fi
mkdir tmp

if [ -d export ] ; then
    rm -rf export
fi
mkdir export

mv *svn* tmp
rm -rf amule*

cd tmp
cd amule-2.2.3+svnr$(cat ../url)

echo 'Build start'
debuild

cd ..
cp *.deb ../export
cp *.dsc ../export
cp *build ../export
cp *gz ../export
cp *changes ../export

cd ..
rm -rf tmp

echo 'END'
Title: Re: Debian SVN build script
Post by: Festor on March 16, 2009, 03:05:05 PM
Thanks! I was searching for a script to automate download tarballs of sourceforge.net
Title: Re: Debian SVN build script
Post by: dreamerwolf on September 11, 2009, 06:32:11 PM
1. amule upgrade to 2.2.5+svn9794
2. wx 2.8.10.1 required (pls download from http://wiki.wxpython.org/InstallingOnUbuntuOrDebian (http://wiki.wxpython.org/InstallingOnUbuntuOrDebian))
3. remove i386 (http://forum.amule.org/index.php?topic=5776.0 (http://forum.amule.org/index.php?topic=5776.0))

If you're using ubuntu, may compile yourself.
(http://forum.amule.org/index.php?topic=16693.0 (http://forum.amule.org/index.php?topic=16693.0))