2010-02-06 02:25:50 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-28 09:29:23 -05:00
|
|
|
###################### PARAMETERS ####################
|
2013-09-07 04:21:13 -04:00
|
|
|
version="0.5.5"
|
2013-01-30 12:45:33 -05:00
|
|
|
svnpath="svn://csoler@svn.code.sf.net/p/retroshare/code/"
|
|
|
|
workdir=retroshare-$version
|
2013-07-28 09:31:36 -04:00
|
|
|
#use_gxs="Y" # comment out to compile without gxs
|
|
|
|
#bubba3="Y" # comment out to compile for bubba3
|
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
|
2013-07-28 09:13:21 -04:00
|
|
|
|
|
|
|
if test "$use_gxs" = "Y" ; then
|
|
|
|
cp -r debian.gxs $workdir/debian
|
|
|
|
else
|
|
|
|
cp -r debian $workdir/debian
|
|
|
|
fi
|
2013-01-28 09:29:23 -05:00
|
|
|
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
|
|
|
|
|
2013-05-25 16:16:58 -04:00
|
|
|
# handling of libssh-0.5.4
|
2013-07-28 09:13:21 -04:00
|
|
|
|
2013-03-04 17:22:27 -05:00
|
|
|
wget https://red.libssh.org/attachments/download/41/libssh-0.5.4.tar.gz
|
2013-01-28 09:29:23 -05:00
|
|
|
cd $workdir
|
2013-03-04 17:22:27 -05:00
|
|
|
tar zxvf ../libssh-0.5.4.tar.gz
|
2013-01-28 09:29:23 -05:00
|
|
|
cd ..
|
2012-10-20 09:10:58 -04:00
|
|
|
|
2013-07-28 09:13:21 -04:00
|
|
|
if ! test "$specific" = "" ; then
|
2013-06-25 18:02:38 -04:00
|
|
|
cd $workdir
|
|
|
|
git clone https://github.com/sqlcipher/sqlcipher.git
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
# cleaning up protobof generated files
|
2013-07-28 09:13:21 -04:00
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
\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-11-05 18:17:05 -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-11-05 18:17:05 -05:00
|
|
|
cp /tmp/toto2342 $workdir/src/libretroshare/src/util/rsversion.h
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2013-10-27 18:13:18 -04:00
|
|
|
cat $workdir/src/retroshare-gui/src/util/rsguiversion.cc | 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-10-27 18:13:18 -04:00
|
|
|
cp /tmp/toto4463 $workdir/src/retroshare-gui/src/util/rsguiversion.cpp
|
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
|
|
|
|
2013-07-28 09:13:21 -04:00
|
|
|
#echo Calling debuild...
|
|
|
|
#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
|
|
|
|
2013-07-28 09:13:21 -04:00
|
|
|
#for i in wheezy; do
|
2013-06-25 18:02:38 -04:00
|
|
|
#for i in sid ; do
|
2013-01-28 09:29:23 -05:00
|
|
|
#for i in precise; do
|
2013-10-19 08:34:11 -04:00
|
|
|
#for i in lucid precise quantal raring; do
|
|
|
|
for i in wheezy squeeze lucid precise quantal raring saucy; do
|
2013-07-28 09:31:36 -04:00
|
|
|
#for i in sid squeeze; do
|
2013-03-01 12:46:52 -05:00
|
|
|
echo copying changelog for $i
|
|
|
|
cat ../changelog | sed -e s/XXXXXX/"$svn"/g | sed -e s/YYYYYY/"$i"/g > debian/changelog
|
2013-07-28 09:13:21 -04:00
|
|
|
|
|
|
|
if test "$i" = "lucid" ; then
|
|
|
|
cp ../control.ubuntu_lucid debian/control
|
2013-10-19 08:34:11 -04:00
|
|
|
elif test "$i" = "squeeze" ; then
|
2013-07-28 09:13:21 -04:00
|
|
|
cp ../control.squeeze_bubba3 debian/control
|
|
|
|
else
|
|
|
|
cp ../debian/control debian/control
|
|
|
|
fi
|
2013-03-01 12:46:52 -05:00
|
|
|
|
|
|
|
# This is the key for "Cyril Soler <csoler@sourceforge.net>"
|
|
|
|
debuild -S -kC737CA98
|
|
|
|
done
|
|
|
|
|
2011-02-23 05:49:53 -05:00
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
|