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"
|
2015-08-01 17:13:44 -04:00
|
|
|
gitpath="https://github.com/RetroShare/RetroShare.git"
|
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-08-01 17:13:44 -04:00
|
|
|
echo This script is going to build the debian source package for RetroShare, from the Git 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
|
2015-08-01 17:13:44 -04:00
|
|
|
rev=""
|
2014-12-27 12:15:50 -05:00
|
|
|
dist=""
|
|
|
|
# This is the key for "Cyril Soler <csoler@sourceforge.net>"
|
2015-08-01 17:13:44 -04:00
|
|
|
gpgkey="0932399B"
|
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
while [ ${#} -gt 0 ]; do
|
|
|
|
case ${1} in
|
|
|
|
"-rev") shift
|
2015-08-01 17:13:44 -04:00
|
|
|
rev=${1}
|
2015-04-04 11:37:54 -04:00
|
|
|
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-08-01 17:13:44 -04:00
|
|
|
echo Attempting to get revision number...
|
|
|
|
ccount=`git rev-list --count --all`
|
|
|
|
ccount=`expr $ccount + 8613 - 8267`
|
2015-01-10 07:47:58 -05:00
|
|
|
|
2015-08-01 17:13:44 -04:00
|
|
|
date=`git log --pretty=format:"%ai" | head -1 | cut -d\ -f1`
|
|
|
|
hhsh=`git log --pretty=format:"%h" | head -1`
|
2015-01-10 07:47:58 -05:00
|
|
|
|
2015-08-01 17:13:44 -04:00
|
|
|
rev=${ccount}.${hhsh}
|
|
|
|
|
|
|
|
echo " "Using PGP key id : ${gpgkey}
|
|
|
|
echo " "Using distributions: ${dist}
|
|
|
|
echo " "Commit count : ${ccount}
|
|
|
|
echo " "Date : ${date}
|
|
|
|
echo " "Hash : ${hhsh}
|
|
|
|
echo " "Using revision : ${rev}
|
2011-02-23 05:49:53 -05:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
echo Done.
|
2015-08-01 17:13:44 -04:00
|
|
|
version="${version}"."${rev}"
|
2015-04-04 11:37:54 -04:00
|
|
|
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
|
|
|
|
|
|
|
|
echo Extracting base archive...
|
2013-01-28 09:29:23 -05:00
|
|
|
|
2015-04-04 11:37:54 -04:00
|
|
|
mkdir -p ${workdir}/src
|
|
|
|
echo Checking out latest snapshot...
|
|
|
|
cd ${workdir}/src
|
2015-08-01 17:13:44 -04:00
|
|
|
git clone https://github.com/RetroShare/RetroShare.git .
|
2015-04-04 11:37:54 -04:00
|
|
|
cd -
|
2013-01-28 09:29:23 -05:00
|
|
|
|
2015-08-01 17:13:44 -04:00
|
|
|
cp -r data ${workdir}/src/
|
|
|
|
cp -r debian ${workdir}/debian
|
|
|
|
|
|
|
|
#svn co -r${rev} ${svnpath}/trunk/ .
|
|
|
|
|
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-08-01 17:13:44 -04:00
|
|
|
echo waiting...
|
|
|
|
read tmp
|
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-08-01 17:13:44 -04:00
|
|
|
sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER ${rev}%" 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}
|
2015-08-01 17:13:44 -04:00
|
|
|
sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g ../changelog > debian/changelog
|
2015-04-04 11:37:54 -04:00
|
|
|
|
|
|
|
if test "${i}" = "lucid" ; then
|
|
|
|
cp ../control.ubuntu_lucid debian/control
|
|
|
|
elif test "${i}" = "squeeze" ; then
|
|
|
|
cp ../control.squeeze_bubba3 debian/control
|
2015-06-15 16:12:20 -04:00
|
|
|
elif test "${i}" = "precise" ; then
|
|
|
|
cp ../control.precise debian/control
|
2015-04-04 11:37:54 -04:00
|
|
|
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
|