2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/build/launchpad
Laurent Destailleur bf0e4d73d0 Fix launchpad conflicts
2013-03-01 10:04:50 +01:00
..
2013-03-01 10:04:50 +01:00

README (English)
##################################################
Launchpad Package tools
##################################################

This directory contains files to explain how to publish
a package onto LaunchPad


# This is standard command to work on RPM packaging:
#
# To install all packagers tools:
# sudo apt-get install bzr-builder bzr dpatch pbuilder debootstrap devscripts


# Init local working env
#----------------------------------

- Create account on launchpad.org
- Create Project
- Link project to official SCM server
- Upload SSH public key onto account
- Upload you GPG sign key
- Run from command line: 
    bzr launchpad-login yourlogin
    bzr whoami "Your Name <email@email.com>"
    bzr whoami
- Edit file ~/.bashrc to add
DEBFULLNAME="<Your name>" 
DEBEMAIL="<Your email address>" 

If you want to build/test package locally:
- Create a file ~/.pbuilderrc with content
    COMPONENTS="main universe multiverse restricted"
- Create chroot ubuntu env
    sudo pbuilder create [--distribution sid|squeeze]


# Push/declare sources to Launchpad
#----------------------------------

- Create a series (https://launchpad.net/dolibarr/)
    Call it 'dev', 'stable' or 'beta'
    For dev: Configure Series branch - Link to series
    For stable: Add file with *: http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_3.2.*.tar.gz
    For beta: Add file with *: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_3.2.*.tar.gz
    mkdir bzr
    bzr init
    bzr add
    bzr commit -m "Init"

List of series created:
https://launchpad.net/dolibarr/trunk
https://launchpad.net/dolibarr/beta
https://launchpad.net/dolibarr/stable

# Init repository of sources into launchpad (when repository for sources does not exist)
#----------------------------------

- Create debian directory and upload it onto bzr branch ~yourlogin/+junk/debian-[dev|stable]
    mkdir bzr
    cd bzr
    mkdir debian
    cd debian
    cp -pr dolibarr_root/debian bzr/debian
    bzr init
    bzr add
    bzr commit -m "Init control files"
    bzr push lp:~yourlogin/+junk/debian-[dev|beta|stable]    (put here any branch name)
  or download it from launchpad bazaar:
    cd bzr
    bzr branch lp:~yourlogin/+junk/debian-[dev|beta|stable]
  
  For sources, same with
    bzr push lp:~yourlogin/dolibarr/[dev|beta|stable]

- To update this debian directory, edit files into the bzr dir and run
    bzr status
    bzr commit -m "Description of change"
    bzr push lp:~yourlogin/+junk/debian-[dev|beta|stable]

# Get repository of sources from launchpad (when repository for sources already exists)
#----------------------------------
	cd bzr
	bzr branch lp:~yourlogin/+junk/debian-[dev|stable]


# Define a recipe into launchpad (a rule to build packages into a PPA)
#----------------------------------

- Create a file dolibarr.recipe with content
    cd bzr
    vi dolibarr.recipe
    	For dev:
	    # bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
		lp:dolibarr
		merge packaging lp:~yourlogin/+junk/debian-dev
    	For beta:
	    # bzr-builder format 0.3 deb-version {debupstream}-1~{revno}
		lp:dolibarr/beta
		merge packaging lp:~yourlogin/+junk/debian-beta
    	For stable:
	    # bzr-builder format 0.3 deb-version {debupstream}-2~{revno}
		lp:dolibarr/stable
		merge packaging lp:~yourlogin/+junk/debian-stable
- Run command
    cd bzr
    bzr dailydeb dolibarr.recipe working-dir
  This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|beta|stable]
- Test package sources
    sudo pbuilder build <working-dir>/<project>_<version>.dsc

List of recipes created
https://code.launchpad.net/~eldy/+recipe/dolibarr-dev
https://code.launchpad.net/~eldy/+recipe/dolibarr-beta
https://code.launchpad.net/~eldy/+recipe/dolibarr-stable

    
# To get/download package from PPA:
#----------------------------------

Add signing key of the Launchpad repository:
> gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD
> sudo apt-key add ~/.gnupg/pubring.gpg

Add Dolibarr Launchpad repository to your system setup by adding the two lines to /etc/apt/sources.list
For the development snapshot version: 
deb http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main 
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main 
For the beta version: 
deb http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main 
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-beta/ubuntu precise main 
For the stable version:
deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main 
deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main 

Update your package cache:
> apt-get update

Install Dolibarr: 
> apt-get install dolibarr