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/"
|
2015-04-04 11:37:54 -04:00
|
|
|
workdir=retroshare06-${version}
|
2014-09-06 12:45:42 -04:00
|
|
|
#bubba3="Y" # comment out to compile for bubba3
|
2013-01-28 09:29:23 -05:00
|
|
|
######################################################
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo This script is going to build the debian source package for RetroShare, from the SVN repository.
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
if test -d "${workdir}" ; then
|
|
|
|
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"
|
2015-04-04 11:37:54 -04:00
|
|
|
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
|
|
|
|
;;
|
2014-12-27 12:15:50 -05:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2015-04-04 11:52:02 -04:00
|
|
|
if test "${dist}" = "" ; then
|
2015-04-30 16:03:38 -04:00
|
|
|
dist="precise trusty utopic vivid"
|
2015-04-04 11:52:02 -04:00
|
|
|
fi
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo " "Using PGP key id : ${gpgkey}
|
|
|
|
echo " "Using distributions: ${dist}
|
|
|
|
echo " "Using svn : ${rev}
|
2015-01-10 07:47:58 -05:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo Updating SVN...
|
2015-01-10 07:47:58 -05:00
|
|
|
svn update
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
if test "${svnrev}" = "" ; then
|
|
|
|
echo Attempting to get SVN revision number...
|
|
|
|
svnrev=`svn info|awk '/^Revision:/ {print $NF}'`
|
2011-02-23 05:49:53 -05:00
|
|
|
else
|
2015-04-04 11:37:54 -04:00
|
|
|
echo SVN number has been provided. Forcing update.
|
2011-02-23 05:49:53 -05:00
|
|
|
fi
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo Done.
|
|
|
|
version="${version}"."${svnrev}"
|
|
|
|
echo Got version number ${version}.
|
2011-02-23 05:49:53 -05:00
|
|
|
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="."
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo SVN number is ${svnrev}
|
|
|
|
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
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
mkdir -p ${workdir}/src
|
|
|
|
cp -r data ${workdir}/src/
|
|
|
|
cp -r debian ${workdir}/debian
|
2010-08-02 06:27:40 -04:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo Checking out latest snapshot...
|
|
|
|
cd ${workdir}/src
|
|
|
|
svn co -r${svnrev} ${svnpath}/trunk/ .
|
|
|
|
cd -
|
2013-01-28 09:29:23 -05:00
|
|
|
|
|
|
|
# VOIP tweak
|
2015-04-04 11:37:54 -04:00
|
|
|
cp ${workdir}/src/retroshare-gui/src/gui/chat/PopupChatDialog.ui ${workdir}/src/plugins/VOIP/gui/PopupChatDialog.ui
|
2013-01-28 09:29:23 -05:00
|
|
|
|
2015-04-30 14:52:42 -04:00
|
|
|
# # handling of libssh
|
|
|
|
# LIBSSH_VERSION=0.6.4
|
|
|
|
# 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
|
|
|
|
# tar zxvf ../libssh-${LIBSSH_VERSION}.tar.gz
|
2012-10-20 09:10:58 -04:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
# Cloning sqlcipher
|
2014-09-21 10:25:58 -04:00
|
|
|
# git clone https://github.com/sqlcipher/sqlcipher.git
|
2013-06-25 18:02:38 -04:00
|
|
|
|
2013-01-30 12:45:33 -05:00
|
|
|
# cleaning up protobof generated files
|
2015-04-30 16:03:38 -04:00
|
|
|
# rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.h
|
|
|
|
# rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.cc
|
2013-01-30 12:45:33 -05:00
|
|
|
|
2015-04-30 16:03:38 -04:00
|
|
|
cd ${workdir}
|
2010-08-02 06:27:40 -04:00
|
|
|
echo Setting version numbers...
|
|
|
|
|
|
|
|
# setup version numbers
|
2015-04-30 16:03:38 -04:00
|
|
|
sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER ${svnrev}%" src/libretroshare/src/retroshare/rsversion.in > src/libretroshare/src/retroshare/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...
|
2015-04-04 11:37:54 -04:00
|
|
|
find . -depth -name ".svn" -a -type d -exec rm -rf {} \; # remove all svn repositories
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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}
|
2013-03-01 12:46:52 -05:00
|
|
|
done
|
2015-04-04 11:37:54 -04:00
|
|
|
cd -
|
|
|
|
|
|
|
|
exit 0
|