fixed packaging script for debian release

This commit is contained in:
csoler 2018-05-09 10:15:32 +02:00
parent f406d9af16
commit 889c27726e
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -4,7 +4,7 @@
gitpath="https://github.com/RetroShare/RetroShare.git" gitpath="https://github.com/RetroShare/RetroShare.git"
branch="master" branch="master"
#branch="v0.6.3-official_release" #branch="v0.6.3-official_release"
#bubba3="Y" # comment out to compile for bubba3 #bubba3="Y" # comment out to compile for bubba3
###################################################### ######################################################
RS_MAJOR_VERSION=`fgrep RS_MAJOR_VERSION ../../libretroshare/src/retroshare/rsversion.h | cut -d\\ -f3- | sed -e s\/\ \/\/g | cut -c1` RS_MAJOR_VERSION=`fgrep RS_MAJOR_VERSION ../../libretroshare/src/retroshare/rsversion.h | cut -d\\ -f3- | sed -e s\/\ \/\/g | cut -c1`
@ -44,8 +44,11 @@ while [ ${#} -gt 0 ]; do
rev=${1} rev=${1}
shift shift
;; ;;
# "-debian") shift
# debian="true"
# ;;
"-retrotor") shift "-retrotor") shift
useretrotor="true" useretrotor="true"
;; ;;
"-distribution") shift "-distribution") shift
dist=${1} dist=${1}
@ -68,16 +71,16 @@ while [ ${#} -gt 0 ]; do
done done
if test "${useretrotor}" = "true"; then if test "${useretrotor}" = "true"; then
if ! test "${dist}" = "trusty"; then if ! test "${dist}" = "trusty"; then
echo ERROR: retro-tor can only be packaged for trusty for now. echo ERROR: retro-tor can only be packaged for trusty for now.
exit 1; exit 1;
fi fi
#gitpath="https://github.com/csoler/RetroShare.git" #gitpath="https://github.com/csoler/RetroShare.git"
#branch="v0.6-TorOnly" #branch="v0.6-TorOnly"
fi fi
if test "${dist}" = "" ; then if test "${dist}" = "" ; then
dist="trusty xenial artful bionic" dist="trusty xenial artful bionic"
fi fi
echo Attempting to get revision number... echo Attempting to get revision number...
@ -96,7 +99,7 @@ echo " Using distributions:"${dist}
echo " Using PGP key id :"${gpgkey} echo " Using PGP key id :"${gpgkey}
if test ${useretrotor} = "true"; then if test ${useretrotor} = "true"; then
echo " "Specific flags : retrotor echo " "Specific flags : retrotor
fi fi
echo Done. echo Done.
@ -115,15 +118,15 @@ cd ${workdir}/src
git clone --depth 1 ${gitpath} --single-branch --branch $branch . git clone --depth 1 ${gitpath} --single-branch --branch $branch .
# if ! test "$hhsh" = "" ; then # if ! test "$hhsh" = "" ; then
# echo Checking out revision $hhsh # echo Checking out revision $hhsh
# git checkout $hhsh # git checkout $hhsh
# fi # fi
cd - cd -
if ! test -d ${workdir}/src/libretroshare/; then if ! test -d ${workdir}/src/libretroshare/; then
echo Git clone failed. echo Git clone failed.
exit exit
fi fi
cp -r debian ${workdir}/debian cp -r debian ${workdir}/debian
@ -147,21 +150,26 @@ echo Cleaning...
echo Calling debuild... echo Calling debuild...
for i in ${dist}; do for i in ${dist}; do
echo copying changelog for ${i}
sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g -e s/ZZZZZZ/"${version_number}"/g ../changelog > debian/changelog
if test ${useretrotor} = "true"; then if ! test "${i}" = "debian"; then
cp ../rules.retrotor debian/rules echo copying changelog for ${i}
cp ../control.trusty_retrotor debian/control sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g -e s/ZZZZZZ/"${version_number}"/g ../changelog > debian/changelog
elif test -f ../control."${i}" ; then
echo \/\!\\ Using specific control file for distribution "${i}" if test ${useretrotor} = "true"; then
cp ../control."${i}" debian/control cp ../rules.retrotor debian/rules
cp ../control.trusty_retrotor debian/control
elif test -f ../control."${i}" ; then
echo \/\!\\ Using specific control file for distribution "${i}"
cp ../control."${i}" debian/control
else
echo Using standard control file control."${i}" for distribution "${i}"
cp ../debian/control debian/control
fi
else else
echo Using standard control file control."${i}" for distribution "${i}" echo creating official debian release. Using built-in changelog and control files
cp ../debian/control debian/control fi
fi
debuild -S -k${gpgkey} debuild -S -k${gpgkey} --lintian-opts +pedantic -EviIL
done done
cd - cd -