mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-09 22:05:43 -05:00
fix for revision number in ubuntu/debian (patch from heini, untested)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8118 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
81bbb9933d
commit
a4f6500772
5 changed files with 83 additions and 125 deletions
|
|
@ -3,15 +3,15 @@
|
|||
###################### PARAMETERS ####################
|
||||
version="0.6.0"
|
||||
svnpath="svn://csoler@svn.code.sf.net/p/retroshare/code/"
|
||||
workdir=retroshare06-$version
|
||||
workdir=retroshare06-${version}
|
||||
#bubba3="Y" # comment out to compile for bubba3
|
||||
######################################################
|
||||
|
||||
echo This script is going to build the debian source package for RetroShare, from the svn.
|
||||
echo This script is going to build the debian source package for RetroShare, from the SVN repository.
|
||||
|
||||
if test -d "$workdir" ; then
|
||||
echo Removing the $workdir directory...
|
||||
rm -rf $workdir
|
||||
if test -d "${workdir}" ; then
|
||||
echo Removing the ${workdir} directory...
|
||||
rm -rf ${workdir}
|
||||
fi
|
||||
|
||||
# Parse options
|
||||
|
|
@ -19,128 +19,111 @@ 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
|
||||
;;
|
||||
"-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
|
||||
;;
|
||||
"*") echo "Unknown option"
|
||||
exit 1
|
||||
;;
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case ${1} in
|
||||
"-rev") shift
|
||||
svnrev=${1}
|
||||
shift
|
||||
;;
|
||||
"-distribution") shift
|
||||
dist=${1}
|
||||
shift
|
||||
;;
|
||||
"-key") shift
|
||||
gpgkey=${1}
|
||||
shift
|
||||
;;
|
||||
"-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
|
||||
;;
|
||||
"*") echo "Unknown option"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo " "Using PGP key id : $gpgkey
|
||||
echo " "Using distributions: $dist
|
||||
echo " "Using svn : $rev
|
||||
echo " "Using PGP key id : ${gpgkey}
|
||||
echo " "Using distributions: ${dist}
|
||||
echo " "Using svn : ${rev}
|
||||
|
||||
echo Updating svn...
|
||||
echo Updating SVN...
|
||||
svn update
|
||||
|
||||
if test "$svnrev" = "" ; then
|
||||
echo attempting to get svn revision number...
|
||||
svnrev=`svn info | grep 'Revision:' | cut -d\ -f2`
|
||||
if test "${svnrev}" = "" ; then
|
||||
echo Attempting to get SVN revision number...
|
||||
svnrev=`svn info|awk '/^Revision:/ {print $NF}'`
|
||||
else
|
||||
echo svn number has been provided. Forcing update.
|
||||
echo SVN number has been provided. Forcing update.
|
||||
fi
|
||||
|
||||
echo done.
|
||||
version="$version"."$svnrev"
|
||||
echo got version number $version.
|
||||
echo Done.
|
||||
version="${version}"."${svnrev}"
|
||||
echo Got version number ${version}.
|
||||
echo Please check that the changelog is up to date.
|
||||
echo Hit ENTER if this is correct. Otherwise hit Ctrl+C
|
||||
read tmp
|
||||
|
||||
packages="."
|
||||
|
||||
echo SVN number is $svnrev
|
||||
echo version is $version
|
||||
echo SVN number is ${svnrev}
|
||||
echo Version is ${version}
|
||||
|
||||
echo Extracting base archive...
|
||||
|
||||
mkdir -p $workdir/src
|
||||
cp -r data $workdir/src/
|
||||
cp -r debian $workdir/debian
|
||||
mkdir -p ${workdir}/src
|
||||
cp -r data ${workdir}/src/
|
||||
cp -r debian ${workdir}/debian
|
||||
|
||||
echo Checking out latest snapshot in libbitdht...
|
||||
cd $workdir/src/
|
||||
svn co -r$svnrev $svnpath/trunk/ .
|
||||
cd ../..
|
||||
echo Checking out latest snapshot...
|
||||
cd ${workdir}/src
|
||||
svn co -r${svnrev} ${svnpath}/trunk/ .
|
||||
cd -
|
||||
|
||||
# VOIP tweak
|
||||
cp $workdir/src/retroshare-gui/src/gui/chat/PopupChatDialog.ui $workdir/src/plugins/VOIP/gui/PopupChatDialog.ui
|
||||
cp ${workdir}/src/retroshare-gui/src/gui/chat/PopupChatDialog.ui ${workdir}/src/plugins/VOIP/gui/PopupChatDialog.ui
|
||||
|
||||
# handling of libssh
|
||||
#LIBSSH_VERSION=0.5.4
|
||||
#LIBSSH_DIR=41
|
||||
#LIBSSH_LOCATION=https://red.libssh.org/attachments/download/${LIBSSH_DIR}/libssh-${LIBSSH_VERSION}.tar.gz
|
||||
|
||||
LIBSSH_VERSION=0.6.4
|
||||
LIBSSH_DIR=107
|
||||
LIBSSH_LOCATION=https://git.libssh.org/projects/libssh.git/snapshot/libssh-${LIBSSH_VERSION}.tar.gz
|
||||
|
||||
[ -f libssh-${LIBSSH_VERSION}.tar.gz ] || wget --no-check-certificate -O libssh-${LIBSSH_VERSION}.tar.gz $LIBSSH_LOCATION
|
||||
cd $workdir
|
||||
cd ${workdir}
|
||||
tar zxvf ../libssh-${LIBSSH_VERSION}.tar.gz
|
||||
cd ..
|
||||
|
||||
# cd $workdir
|
||||
# Cloning sqlcipher
|
||||
# git clone https://github.com/sqlcipher/sqlcipher.git
|
||||
# cd ..
|
||||
|
||||
# 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
|
||||
rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.h
|
||||
rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.cc
|
||||
|
||||
echo Setting version numbers...
|
||||
|
||||
# setup version numbers
|
||||
cat $workdir/src/libretroshare/src/retroshare/rsversion.h | grep -v RS_REVISION | grep -v RS_REVISION_NUMBER > /tmp/toto2342
|
||||
echo \#define RS_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto2342
|
||||
echo \#define RS_REVISION_NUMBER $svnrev >> /tmp/toto2342
|
||||
cp /tmp/toto2342 $workdir/src/libretroshare/src/retroshare/rsversion.h
|
||||
|
||||
cat $workdir/src/retroshare-gui/src/util/rsguiversion.h | grep -v GUI_REVISION | grep -v GUI_VERSION > /tmp/toto4463
|
||||
echo \#define GUI_REVISION \"Revision: "$version" date : `date`\" >> /tmp/toto4463
|
||||
echo \#define GUI_VERSION \"Revision: "$svnrev"\" >> /tmp/toto4463
|
||||
cp /tmp/toto4463 $workdir/src/retroshare-gui/src/util/rsguiversion.h
|
||||
sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER ${svnrev}%" src/libretroshare/src/retroshare/rsversion.in >src/libretroshare/src/retroshare/rsversion.h
|
||||
|
||||
# Various cleaning
|
||||
echo Cleaning...
|
||||
find $workdir -name ".svn" -exec rm -rf {} \; # remove all svn repositories
|
||||
find . -depth -name ".svn" -a -type d -exec rm -rf {} \; # remove all svn repositories
|
||||
|
||||
#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
|
||||
echo Calling debuild...
|
||||
for i in ${dist}; do
|
||||
echo copying changelog for ${i}
|
||||
sed -e s/XXXXXX/"${svnrev}"/g -e s/YYYYYY/"${i}"/g ../changelog > debian/changelog
|
||||
|
||||
cd $workdir
|
||||
if test "${i}" = "lucid" ; then
|
||||
cp ../control.ubuntu_lucid debian/control
|
||||
elif test "${i}" = "squeeze" ; then
|
||||
cp ../control.squeeze_bubba3 debian/control
|
||||
else
|
||||
cp ../debian/control debian/control
|
||||
fi
|
||||
|
||||
for i in $dist; do
|
||||
echo copying changelog for $i
|
||||
sed -e s/XXXXXX/"$svnrev"/g -e s/YYYYYY/"$i"/g ../changelog > debian/changelog
|
||||
|
||||
if test "$i" = "lucid" ; then
|
||||
cp ../control.ubuntu_lucid debian/control
|
||||
elif test "$i" = "squeeze" ; then
|
||||
cp ../control.squeeze_bubba3 debian/control
|
||||
else
|
||||
cp ../debian/control debian/control
|
||||
fi
|
||||
|
||||
debuild -S -k$gpgkey
|
||||
debuild -S -k${gpgkey}
|
||||
done
|
||||
cd -
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue