2010-02-06 02:25:50 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-28 09:29:23 -05:00
|
|
|
###################### PARAMETERS ####################
|
|
|
|
version="0.5.4"
|
2013-01-30 12:45:33 -05:00
|
|
|
svnpath="svn://csoler@svn.code.sf.net/p/retroshare/code/"
|
|
|
|
workdir=retroshare-$version
|
2013-01-28 09:29:23 -05:00
|
|
|
######################################################
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo This script is going to build the debian source package for RetroShare, from the svn.
|
|
|
|
|
2012-09-29 08:40:18 -04:00
|
|
|
if test -d "$workdir" ; then
|
|
|
|
echo Please remove the $workdir directory first.
|
2010-02-06 02:25:50 -05:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
svn update
|
|
|
|
|
2011-02-23 05:49:53 -05:00
|
|
|
if test "$1" = "" ; then
|
|
|
|
echo attempting to get svn revision number...
|
|
|
|
svn=`svn info | grep 'Revision:' | cut -d\ -f2`
|
|
|
|
else
|
|
|
|
echo svn number has been provided. Forcing update.
|
|
|
|
svn="$1"
|
|
|
|
fi
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo done.
|
|
|
|
version="$version"."$svn"
|
2011-02-23 05:49:53 -05:00
|
|
|
echo got version number $version.
|
|
|
|
echo Please check that the changelog is up to date.
|
|
|
|
echo Hit ENTER is this is this correct. Otherwise hit Ctrl+C
|
2010-08-02 06:27:40 -04:00
|
|
|
read tmp
|
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
packages="."
|
|
|
|
|
2010-10-28 15:50:53 -04:00
|
|
|
echo SVN number is $svn
|
2010-08-02 06:27:40 -04:00
|
|
|
echo version is $version
|
2010-02-06 02:25:50 -05:00
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Extracting base archive...
|
2013-01-28 09:29:23 -05:00
|
|
|
|
|
|
|
mkdir -p $workdir/src
|
|
|
|
cp -r debian $workdir/
|
|
|
|
cp -r data $workdir/src/
|
2010-08-02 06:27:40 -04:00
|
|
|
|
|
|
|
echo Checking out latest snapshot in libbitdht...
|
2013-01-28 09:29:23 -05:00
|
|
|
cd $workdir/src/
|
|
|
|
svn co -r$svn $svnpath/trunk/ .
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
# VOIP tweak
|
|
|
|
cp $workdir/src/retroshare-gui/src/gui/chat/PopupChatDialog.ui $workdir/src/plugins/VOIP/gui/PopupChatDialog.ui
|
|
|
|
|
|
|
|
# handling of libssh-0.5.2
|
|
|
|
wget http://www.libssh.org/files/0.5/libssh-0.5.2.tar.gz
|
|
|
|
cd $workdir
|
|
|
|
tar zxvf ../libssh-0.5.2.tar.gz
|
|
|
|
cd ..
|
2012-10-20 09:10:58 -04:00
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
# cleaning up protobof generated files
|
|
|
|
\rm -f $workdir/src/rsctrl/src/gencc/*.pb.h
|
|
|
|
\rm -f $workdir/src/rsctrl/src/gencc/*.pb.cpp
|
|
|
|
\rm -f $workdir/src/retroshare-nogui/src/rpc/proto/gencc/*.pb.h
|
|
|
|
\rm -f $workdir/src/retroshare-nogui/src/rpc/proto/gencc/*.pb.cc
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Setting version numbers...
|
|
|
|
|
|
|
|
# setup version numbers
|
2013-01-28 09:29:23 -05:00
|
|
|
cat $workdir/src/libretroshare/src/util/rsversion.h | grep -v SVN_REVISION | grep -v SVN_REVISION_NUMBER > /tmp/toto2342
|
2010-10-28 15:50:53 -04:00
|
|
|
echo \#define SVN_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto2342
|
2012-09-12 09:16:23 -04:00
|
|
|
echo \#define SVN_REVISION_NUMBER $svn >> /tmp/toto2342
|
2013-01-28 09:29:23 -05:00
|
|
|
cp /tmp/toto2342 $workdir/src/libretroshare/src/util/rsversion.h
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2013-01-28 09:29:23 -05:00
|
|
|
cat $workdir/src/retroshare-gui/src/util/rsversion.h | grep -v GUI_REVISION | grep -v SVN_REVISION_NUMBER > /tmp/toto4463
|
2010-10-28 15:50:53 -04:00
|
|
|
echo \#define GUI_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto4463
|
2012-09-12 09:16:23 -04:00
|
|
|
echo \#define SVN_REVISION_NUMBER $svn >> /tmp/toto4463
|
2013-01-28 09:29:23 -05:00
|
|
|
cp /tmp/toto4463 $workdir/src/retroshare-gui/src/util/rsversion.h
|
2010-02-06 02:25:50 -05:00
|
|
|
|
2010-02-06 17:26:30 -05:00
|
|
|
# Various cleaning
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Cleaning...
|
2012-09-29 08:40:18 -04:00
|
|
|
find $workdir -name ".svn" -exec rm -rf {} \; # remove all svn repositories
|
2010-02-06 17:26:30 -05:00
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Calling debuild...
|
2012-09-29 08:40:18 -04:00
|
|
|
cat $workdir/debian/control | sed -e s/XXXXXX/"$version"/g > $workdir/debian/control.tmp
|
|
|
|
mv -f $workdir/debian/control.tmp $workdir/debian/control
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2012-09-29 08:40:18 -04:00
|
|
|
cd $workdir
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2012-09-15 08:35:47 -04:00
|
|
|
#for i in sid; do
|
2013-01-28 09:29:23 -05:00
|
|
|
#for i in precise; do
|
|
|
|
for i in maverick natty oneiric precise quantal ; do
|
2011-02-23 05:49:53 -05:00
|
|
|
echo copying changelog for $i
|
|
|
|
cat ../changelog | sed -e s/XXXXXX/"$svn"/g | sed -e s/YYYYYY/"$i"/g > debian/changelog
|
|
|
|
|
|
|
|
# This is the key for "Cyril Soler <csoler@sourceforge.net>"
|
|
|
|
debuild -S -kC737CA98
|
|
|
|
done
|
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
|