2010-02-06 02:25:50 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-28 09:29:23 -05:00
|
|
|
###################### PARAMETERS ####################
|
2014-09-06 12:45:42 -04:00
|
|
|
version="0.6.0"
|
2013-01-30 12:45:33 -05:00
|
|
|
svnpath="svn://csoler@svn.code.sf.net/p/retroshare/code/"
|
2014-09-06 12:45:42 -04:00
|
|
|
workdir=retroshare06-$version
|
|
|
|
#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
|
2014-12-27 12:15:50 -05:00
|
|
|
echo Removing the $workdir directory...
|
|
|
|
rm -rf $workdir
|
2010-02-06 02:25:50 -05:00
|
|
|
fi
|
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
# Parse options
|
|
|
|
svnrev=""
|
|
|
|
dist=""
|
|
|
|
# This is the key for "Cyril Soler <csoler@sourceforge.net>"
|
|
|
|
gpgkey="C737CA98"
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
"-rev") shift
|
|
|
|
svnrev=$1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
"-distribution") shift
|
|
|
|
dist=$1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
"-key") shift
|
|
|
|
gpgkey=$1
|
|
|
|
shift
|
|
|
|
;;
|
2015-01-10 07:47:58 -05:00
|
|
|
"-h") shift
|
|
|
|
echo Package building script for debian/ubuntu distributions
|
|
|
|
echo Usage:
|
|
|
|
echo " "$0 '-key [PGP key id] -rev [svn revision number] -distribution [distrib name list with quotes, in (wheezy, sid, precise, saucy, etc)]'
|
|
|
|
exit 1
|
|
|
|
;;
|
2014-12-27 12:15:50 -05:00
|
|
|
"*") echo "Unknown option"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2015-01-10 07:47:58 -05:00
|
|
|
echo " "Using PGP key id : $gpgkey
|
|
|
|
echo " "Using distributions: $dist
|
|
|
|
echo " "Using svn : $rev
|
|
|
|
|
|
|
|
echo Updating svn...
|
|
|
|
svn update
|
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
if test "$svnrev" = "" ; then
|
2011-02-23 05:49:53 -05:00
|
|
|
echo attempting to get svn revision number...
|
2015-01-01 09:38:30 -05:00
|
|
|
svnrev=`svn info | grep 'Revision:' | cut -d\ -f2`
|
2011-02-23 05:49:53 -05:00
|
|
|
else
|
|
|
|
echo svn number has been provided. Forcing update.
|
|
|
|
fi
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo done.
|
2014-12-27 12:15:50 -05:00
|
|
|
version="$version"."$svnrev"
|
2011-02-23 05:49:53 -05:00
|
|
|
echo got version number $version.
|
|
|
|
echo Please check that the changelog is up to date.
|
2014-12-27 12:15:50 -05:00
|
|
|
echo Hit ENTER if this is correct. Otherwise hit Ctrl+C
|
2010-08-02 06:27:40 -04:00
|
|
|
read tmp
|
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
packages="."
|
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
echo SVN number is $svnrev
|
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 data $workdir/src/
|
2014-09-06 12:45:42 -04:00
|
|
|
cp -r debian $workdir/debian
|
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/
|
2014-12-27 12:15:50 -05:00
|
|
|
svn co -r$svnrev $svnpath/trunk/ .
|
2013-01-28 09:29:23 -05:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
# VOIP tweak
|
|
|
|
cp $workdir/src/retroshare-gui/src/gui/chat/PopupChatDialog.ui $workdir/src/plugins/VOIP/gui/PopupChatDialog.ui
|
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
# handling of libssh
|
|
|
|
#LIBSSH_VERSION=0.5.4
|
|
|
|
#LIBSSH_DIR=41
|
|
|
|
LIBSSH_VERSION=0.6.4
|
|
|
|
LIBSSH_DIR=107
|
|
|
|
[ -f libssh-${LIBSSH_VERSION}.tar.gz ] || wget --no-check-certificate -O libssh-${LIBSSH_VERSION}.tar.gz https://red.libssh.org/attachments/download/${LIBSSH_DIR}/libssh-${LIBSSH_VERSION}.tar.gz
|
2013-01-28 09:29:23 -05:00
|
|
|
cd $workdir
|
2014-12-27 12:15:50 -05:00
|
|
|
tar zxvf ../libssh-${LIBSSH_VERSION}.tar.gz
|
2013-01-28 09:29:23 -05:00
|
|
|
cd ..
|
2012-10-20 09:10:58 -04:00
|
|
|
|
2014-09-21 10:25:58 -04:00
|
|
|
# cd $workdir
|
|
|
|
# git clone https://github.com/sqlcipher/sqlcipher.git
|
|
|
|
# cd ..
|
2013-06-25 18:02:38 -04:00
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
# cleaning up protobof generated files
|
|
|
|
\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
|
2014-12-27 12:15:50 -05:00
|
|
|
echo \#define SVN_REVISION_NUMBER $svnrev >> /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-12-08 09:13:29 -05:00
|
|
|
cat $workdir/src/retroshare-gui/src/util/rsguiversion.h | grep -v GUI_REVISION | grep -v GUI_VERSION > /tmp/toto4463
|
2010-10-28 15:50:53 -04:00
|
|
|
echo \#define GUI_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto4463
|
2014-12-27 12:15:50 -05:00
|
|
|
echo \#define GUI_VERSION \"Revision: "$svnrev"\" >> /tmp/toto4463
|
2013-12-08 09:13:29 -05:00
|
|
|
cp /tmp/toto4463 $workdir/src/retroshare-gui/src/util/rsguiversion.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
|
|
|
|
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
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
for i in $dist; do
|
2013-03-01 12:46:52 -05:00
|
|
|
echo copying changelog for $i
|
2014-12-27 12:15:50 -05:00
|
|
|
sed -e s/XXXXXX/"$svnrev"/g -e s/YYYYYY/"$i"/g ../changelog > 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
|
|
|
|
2014-12-27 12:15:50 -05:00
|
|
|
debuild -S -k$gpgkey
|
2013-03-01 12:46:52 -05:00
|
|
|
done
|