From 90d9957ad71fb6eb2c02a98a949a996ba0e957b2 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 10 Jan 2015 12:47:58 +0000 Subject: [PATCH] updated scripts and README file for debian packaging git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7830 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- build_scripts/Ubuntu_src/README.txt | 74 ++++++++++++++++--- build_scripts/Ubuntu_src/makeSourcePackage.sh | 15 +++- 2 files changed, 78 insertions(+), 11 deletions(-) diff --git a/build_scripts/Ubuntu_src/README.txt b/build_scripts/Ubuntu_src/README.txt index 9cc6489c3..47b3ccbe2 100644 --- a/build_scripts/Ubuntu_src/README.txt +++ b/build_scripts/Ubuntu_src/README.txt @@ -1,4 +1,4 @@ -This directory contains the material for buildign a debian/ubuntu source package from +This directory contains the material for building a debian/ubuntu source package from the svn repository of RetroShare. The various files here are: BaseRetroShareDirs.tgz: basic directory structure. Does not contain any source file. @@ -8,14 +8,70 @@ the svn repository of RetroShare. The various files here are: make_tgz.sh : rebuilds the basic directory structure if some config/debian files where modified in the retroshare-0.5 directory -Notes about pbuilder -==================== +The pipeline is the following: -To add a ppa dependency: - - add this line to ~/.pbuilderrc: OTHERMIRROR="deb http://ppa.launchpad.net/guardianproject/ppa/ubuntu precise main" + [This directory] => [Create a source package] => [Compile the package for various ubuntu/debian and various arch] + +How do I create a source package? +================================= + + Use the script! + + > ./makeSourcePackage.sh [-h for options] + + The script gets the svn number, grabs the sources from the svn + repository, removed .svn files from it, and calls debuild to create a + source package. + + You might: + - specify a given svn revision (usually not needed) + - specify a list of distribs to build for + + Example: + + > ./makeSourcePackage.sh -distribution "precise wheezy trusty" + + You should get as many source packages as wanted distributions. For each + of them you get (example here for wheezy): + + retroshare06_0.6.0-0.7829~wheezy.dsc + retroshare06_0.6.0-0.7829~wheezy_source.build + retroshare06_0.6.0-0.7829~wheezy_source.changes + retroshare06_0.6.0-0.7829~wheezy.tar.gz + +How do I create a binary package? +================================= + +*Initial steps* + + 1 - You need to use/install pbuilder-dist: + + > sudo apt-get install ubuntu-dev-tools + + 2 - To do once: Init the building environment for each distribution you need: + + > pbuilder-dist wheezy amd64 create + + Then, when needed, keep t up to date (this solved almost all compiling + issues you might have: + + > pbuilder-dist wheezy amd64 update + + 3 - For ubuntu distribs, add a ppa dependency for sqlcipher: + + * add this line to ~/.pbuilderrc: OTHERMIRROR="deb http://ppa.launchpad.net/guardianproject/ppa/ubuntu precise main" + * add the ppa to the build environment: + + > pbuilder-dist precise login --save-after-login + # apt-key adv --keyserver pgp.mit.edu --recv-keys 2234F563 + # exit + > pbuilder-dist precise update --release-only # the --release-only is really required! + +*Package compilation* + + > pbuilder-dist wheezy build retroshare06_0.6.0~7856~wheezy.dsc + + The generated compiled binary packages (including all package plugins etc) + will be in ~/pbuilder/wheezy_result/ - pbuilder-dist precise login --save-after-login - # apt-key adv --keyserver pgp.mit.edu --recv-keys 2234F563 - # exit - pbuilder-dist precise update --release-only # the --release-only is really required! diff --git a/build_scripts/Ubuntu_src/makeSourcePackage.sh b/build_scripts/Ubuntu_src/makeSourcePackage.sh index ba63f0679..299e17a10 100755 --- a/build_scripts/Ubuntu_src/makeSourcePackage.sh +++ b/build_scripts/Ubuntu_src/makeSourcePackage.sh @@ -14,8 +14,6 @@ if test -d "$workdir" ; then rm -rf $workdir fi -svn update - # Parse options svnrev="" dist="" @@ -35,12 +33,25 @@ while [ $# -gt 0 ]; do 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 Updating svn... +svn update + if test "$svnrev" = "" ; then echo attempting to get svn revision number... svnrev=`svn info | grep 'Revision:' | cut -d\ -f2`