2010-02-06 02:25:50 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo This script is going to build the debian source package for RetroShare, from the svn.
|
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
if test -d "RetroShare" ; then
|
|
|
|
echo Please remove the RetroShare/ directory first.
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
svn update
|
|
|
|
|
|
|
|
###################### PARAMETERS ####################
|
2012-02-08 15:29:30 -05:00
|
|
|
version="0.5.3"
|
2010-08-02 06:27:40 -04:00
|
|
|
######################################################
|
|
|
|
|
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...
|
|
|
|
tar zxvf $packages/BaseRetroShareDirs.tgz 2> /dev/null
|
|
|
|
|
|
|
|
echo Checking out latest snapshot in libbitdht...
|
|
|
|
cd retroshare-0.5/src/libbitdht/
|
2011-02-23 05:49:53 -05:00
|
|
|
svn co -r$svn https://retroshare.svn.sourceforge.net/svnroot/retroshare/trunk/libbitdht/src . 2> /dev/null
|
2010-08-02 06:27:40 -04:00
|
|
|
cd ../../..
|
|
|
|
#
|
2012-07-15 16:01:04 -04:00
|
|
|
echo Checking out latest snapshot in openpgpsdk...
|
|
|
|
cd retroshare-0.5/src/openpgpsdk/
|
|
|
|
svn co -r$svn https://retroshare.svn.sourceforge.net/svnroot/retroshare/trunk/openpgpsdk/src . 2> /dev/null
|
|
|
|
cd ../../..
|
|
|
|
#
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Checking out latest snapshot in libretroshare...
|
2010-02-06 02:25:50 -05:00
|
|
|
cd retroshare-0.5/src/libretroshare/
|
2011-02-23 05:49:53 -05:00
|
|
|
svn co -r$svn https://retroshare.svn.sourceforge.net/svnroot/retroshare/trunk/libretroshare/src . 2> /dev/null
|
2010-02-06 02:25:50 -05:00
|
|
|
cd ../../..
|
2010-02-06 17:26:30 -05:00
|
|
|
#
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Checking out latest snapshot in retroshare-gui...
|
2010-02-06 02:25:50 -05:00
|
|
|
cd retroshare-0.5/src/retroshare-gui/
|
2011-02-23 05:49:53 -05:00
|
|
|
svn co -r$svn https://retroshare.svn.sourceforge.net/svnroot/retroshare/trunk/retroshare-gui/src . 2> /dev/null
|
2010-02-06 02:25:50 -05:00
|
|
|
cd ../../..
|
2010-08-02 06:27:40 -04:00
|
|
|
#
|
|
|
|
echo Checking out latest snapshot in retroshare-nogui...
|
|
|
|
cd retroshare-0.5/src/retroshare-nogui/
|
2011-02-23 05:49:53 -05:00
|
|
|
svn co -r$svn https://retroshare.svn.sourceforge.net/svnroot/retroshare/trunk/retroshare-nogui/src . 2> /dev/null
|
2010-08-02 06:27:40 -04:00
|
|
|
cd ../../..
|
|
|
|
|
2010-10-29 09:37:34 -04:00
|
|
|
echo Copying bdboot.txt file at installation place
|
|
|
|
cp retroshare-0.5/src/libbitdht/bitdht/bdboot.txt
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Setting version numbers...
|
|
|
|
|
|
|
|
# setup version numbers
|
|
|
|
cat retroshare-0.5/src/libretroshare/util/rsversion.h | grep -v SVN_REVISION > /tmp/toto2342
|
2010-10-28 15:50:53 -04:00
|
|
|
echo \#define SVN_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto2342
|
2010-08-02 06:27:40 -04:00
|
|
|
cp /tmp/toto2342 retroshare-0.5/src/libretroshare/util/rsversion.h
|
|
|
|
|
|
|
|
cat retroshare-0.5/src/retroshare-gui/util/rsversion.h | grep -v GUI_REVISION > /tmp/toto4463
|
2010-10-28 15:50:53 -04:00
|
|
|
echo \#define GUI_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto4463
|
2010-08-02 06:27:40 -04:00
|
|
|
cp /tmp/toto4463 retroshare-0.5/src/retroshare-gui/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...
|
2010-02-06 17:26:30 -05:00
|
|
|
find retroshare-0.5 -name ".svn" -exec rm -rf {} \; # remove all svn repositories
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Preparing package
|
2010-02-06 17:26:30 -05:00
|
|
|
mv retroshare-0.5/src/retroshare-gui/RetroShare.pro retroshare-0.5/src/retroshare-gui/retroshare-gui.pro
|
|
|
|
|
|
|
|
./cleanProFile.sh retroshare-0.5/src/libretroshare/libretroshare.pro
|
|
|
|
./cleanProFile.sh retroshare-0.5/src/retroshare-gui/retroshare-gui.pro
|
2010-08-02 06:27:40 -04:00
|
|
|
./cleanProFile.sh retroshare-0.5/src/retroshare-nogui/retroshare-nogui.pro
|
2010-02-06 17:26:30 -05:00
|
|
|
|
|
|
|
echo "DESTDIR = ../../libretroshare/src/lib/" > /tmp/toto75299
|
|
|
|
cat retroshare-0.5/src/libretroshare/libretroshare.pro /tmp/toto75299 > /tmp/toto752992
|
|
|
|
cp /tmp/toto752992 retroshare-0.5/src/libretroshare/libretroshare.pro
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo "DESTDIR = ../../libbitdht/src/lib/" > /tmp/toto75299
|
|
|
|
cat retroshare-0.5/src/libbitdht/libbitdht.pro /tmp/toto75299 > /tmp/toto752992
|
|
|
|
cp /tmp/toto752992 retroshare-0.5/src/libbitdht/libbitdht.pro
|
|
|
|
|
2012-07-15 16:01:04 -04:00
|
|
|
echo "DESTDIR = ../../openpgpsdk/src/lib/" > /tmp/toto75299
|
|
|
|
cat retroshare-0.5/src/openpgpsdk/openpgpsdk.pro /tmp/toto75299 > /tmp/toto752992
|
|
|
|
cp /tmp/toto752992 retroshare-0.5/src/openpgpsdk/openpgpsdk.pro
|
2010-02-12 11:50:57 -05:00
|
|
|
#cat retroshare-gui-ext.pro >> retroshare-0.5/src/retroshare-gui/retroshare-gui.pro
|
2010-02-07 13:07:00 -05:00
|
|
|
|
2011-02-23 05:49:53 -05:00
|
|
|
#echo Building orig directory...
|
|
|
|
#mkdir retroshare-0.5.orig
|
|
|
|
#cp -r retroshare-0.5/src retroshare-0.5.orig
|
2010-02-06 17:26:30 -05:00
|
|
|
|
|
|
|
# Call debuild to make the source debian package
|
|
|
|
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Calling debuild...
|
|
|
|
cat retroshare-0.5/debian/control | sed -e s/XXXXXX/"$version"/g > retroshare-0.5/debian/control.tmp
|
|
|
|
mv -f retroshare-0.5/debian/control.tmp retroshare-0.5/debian/control
|
|
|
|
|
2010-02-06 02:25:50 -05:00
|
|
|
cd retroshare-0.5
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2012-08-30 10:37:27 -04:00
|
|
|
for i in sid; do
|
|
|
|
#for i in precise squeeze oneiric karmic lucid maverick natty; 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
|
|
|
|