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-06-25 18:02:38 -04:00
|
|
|
gxs=".gxs" # comment out to compile without gxs
|
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-06-25 18:02:38 -04:00
|
|
|
cp -r debian"$gxs" $workdir/debian
|
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-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-06-25 18:02:38 -04:00
|
|
|
if ! test "$gxs" = "" ; then
|
|
|
|
cd $workdir
|
|
|
|
git clone https://github.com/sqlcipher/sqlcipher.git
|
|
|
|
# cat src/retroshare-gui/src/retroshare-gui.pro | sed -e s/-lsqlite3/..\\\/..\\\/..\\\/lib\\\/sqlcipher\\\/.libs\\\/libsqlite3.a/g > /tmp/tutu3278
|
|
|
|
cp /tmp/tutu3278 src/retroshare-gui/src/retroshare-gui.pro
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
# cleaning up protobof generated files
|
2013-03-01 12:46:52 -05:00
|
|
|
# \rm -f $workdir/src/rsctrl/src/gencc/*.pb.h
|
|
|
|
# \rm -f $workdir/src/rsctrl/src/gencc/*.pb.cpp
|
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-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
|
|
|
|
2013-05-25 16:16:58 -04:00
|
|
|
#for i in sid squeeze; 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-05-25 16:16:58 -04:00
|
|
|
for i in natty oneiric precise quantal raring; 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
|
2013-03-01 12:46:52 -05:00
|
|
|
for i in lucid; do
|
|
|
|
echo copying changelog for $i
|
|
|
|
cat ../changelog | sed -e s/XXXXXX/"$svn"/g | sed -e s/YYYYYY/"$i"/g > debian/changelog
|
|
|
|
cp ../control.ubuntu_lucid debian/control
|
|
|
|
|
|
|
|
# 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
|
|
|
|