Difference between revisions of "Debian Packaging"

From Sirikata Wiki
Jump to: navigation, search
(Created page with "==Debian Packaging== Create a directory to be used for packaging. The rest of the commands assume you are in that directory. mkdir packaging cd packaging Clone the repositor...")
 
(Creating Release: Update distribution specification for new version note to precise.)
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Debian Packaging==
+
==Prerequisites==
 +
* Create a PGP key (required) and import into Launchpad (optional): https://help.launchpad.net/YourAccount/ImportingYourPGPKey
 +
* Install debian packaging tools: <code>sudo apt-get install pbuilder debootstrap devscripts</code>
 +
* Set your /etc/pbuilderrc to something like this:
 +
  MIRRORSITE=http://us.archive.ubuntu.com/ubuntu/
 +
 
 +
  BUILDUSERID=12345
 +
  BUILDUSERNAME=fakeuser
 +
 
 +
  DISTRIBUTION=oneiric
 +
  COMPONENTS="main restricted universe multiverse"
 +
 
 +
  EXTRAPACKAGES="nano ssh"
 +
 
 +
  TIMEOUT_TIME=24h
 +
* After setting up /etc/pbuilderrc, run:
 +
  sudo pbuilder --create
 +
 
 +
==Creating Release==
 
Create a directory to be used for packaging. The rest of the commands assume you are in that directory.
 
Create a directory to be used for packaging. The rest of the commands assume you are in that directory.
 
   mkdir packaging
 
   mkdir packaging
 
   cd packaging
 
   cd packaging
  
Clone the repository and switch to the release tag:
+
Next, decide what release you are making. The release version should be the upstream release version. The minor version is if the upstream release has a minor release. The debian version is for making new packaged versions for the same upstream release. The debian version for each upstream release should always start with 1. The minor version should be 0 if the upstream release has no minor number.
  git clone git://github.com/sirikata/sirikata.git sirikata-0.0.18
+
   export SIRIKATA_RELEASE="0.0.20"
   cd sirikata-0.0.18
+
   export SIRIKATA_MINOR="0"
   git checkout v0.0.18
+
  export SIRIKATA_DEBIAN="1"
  
Now edit the changelog file to add a new section:
+
Clone the repository, switch to the release tag, and check out submodules:
   dch --newversion 0.0.18-0ubuntu1
+
  git clone git://github.com/sirikata/sirikata.git sirikata-${SIRIKATA_RELEASE}
 +
  cd sirikata-${SIRIKATA_RELEASE}
 +
  git checkout v${SIRIKATA_RELEASE}
 +
  git submodule update --init --recursive
 +
  make update-dependencies
 +
  cd dependencies
 +
  ./install --download-only sdl bullet opencollada v8 ogre chromium ffmpeg
 +
  cd ..
 +
 
 +
Now edit the changelog file to add a new section (you might do this step *before* the tag so it can be part of the "original" tgz). Make sure that the email address in the signature is identical to your Launchpad address:
 +
   dch --newversion ${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}
 +
 
 +
If you are on an older version of Ubuntu, you might need to specify the distribution:
 +
  dch --newversion ${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN} --distribution precise
  
 
Now go back up a directory and create the "orig" tar file that debian requires (note _ instead of -, it matters):
 
Now go back up a directory and create the "orig" tar file that debian requires (note _ instead of -, it matters):
   tar -cvzf sirikata_0.0.18.orig.tar.gz sirikata-0.0.18
+
  cd ..
 +
   tar --exclude-vcs -cvzf sirikata_${SIRIKATA_RELEASE}.orig.tar.gz sirikata-${SIRIKATA_RELEASE}
 +
 
 +
Go back into the directory and create the build:
 +
  cd sirikata-${SIRIKATA_RELEASE}
 +
  debuild -S
 +
 
 +
Go back up and run pbuilder to test if the build works:
 +
  cd ..
 +
  sudo pbuilder --build sirikata_${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}.dsc
 +
 
 +
To upload to launchpad:
 +
  dput ppa:sirikata/sirikata sirikata_${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}_source.changes
 +
 
 +
==Installing==
 +
=== The Easy Way ===
 +
 
 +
  sudo add-apt-repository ppa:sirikata/sirikata
 +
  sudo apt-get update
 +
  sudo apt-get install sirikata
 +
 
 +
=== The Manual Way ===
 +
Put this:
 +
  deb http://ppa.launchpad.net/sirikata/sirikata/ubuntu oneiric main
 +
in this file:
 +
  /etc/apt/sources.list.d/sirikata.list
 +
Then run:
 +
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E3BB648B583006F3
 +
  sudo apt-get update
 +
  sudo apt-get install sirikata

Latest revision as of 21:20, 7 June 2012

Prerequisites

 MIRRORSITE=http://us.archive.ubuntu.com/ubuntu/
 
 BUILDUSERID=12345
 BUILDUSERNAME=fakeuser
 
 DISTRIBUTION=oneiric
 COMPONENTS="main restricted universe multiverse"
 
 EXTRAPACKAGES="nano ssh"
 
 TIMEOUT_TIME=24h
  • After setting up /etc/pbuilderrc, run:
 sudo pbuilder --create

Creating Release

Create a directory to be used for packaging. The rest of the commands assume you are in that directory.

 mkdir packaging
 cd packaging

Next, decide what release you are making. The release version should be the upstream release version. The minor version is if the upstream release has a minor release. The debian version is for making new packaged versions for the same upstream release. The debian version for each upstream release should always start with 1. The minor version should be 0 if the upstream release has no minor number.

 export SIRIKATA_RELEASE="0.0.20"
 export SIRIKATA_MINOR="0"
 export SIRIKATA_DEBIAN="1"

Clone the repository, switch to the release tag, and check out submodules:

 git clone git://github.com/sirikata/sirikata.git sirikata-${SIRIKATA_RELEASE}
 cd sirikata-${SIRIKATA_RELEASE}
 git checkout v${SIRIKATA_RELEASE}
 git submodule update --init --recursive
 make update-dependencies
 cd dependencies
 ./install --download-only sdl bullet opencollada v8 ogre chromium ffmpeg
 cd ..

Now edit the changelog file to add a new section (you might do this step *before* the tag so it can be part of the "original" tgz). Make sure that the email address in the signature is identical to your Launchpad address:

 dch --newversion ${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}

If you are on an older version of Ubuntu, you might need to specify the distribution:

 dch --newversion ${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN} --distribution precise

Now go back up a directory and create the "orig" tar file that debian requires (note _ instead of -, it matters):

 cd ..
 tar --exclude-vcs -cvzf sirikata_${SIRIKATA_RELEASE}.orig.tar.gz sirikata-${SIRIKATA_RELEASE}

Go back into the directory and create the build:

 cd sirikata-${SIRIKATA_RELEASE}
 debuild -S

Go back up and run pbuilder to test if the build works:

 cd ..
 sudo pbuilder --build sirikata_${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}.dsc

To upload to launchpad:

 dput ppa:sirikata/sirikata sirikata_${SIRIKATA_RELEASE}-${SIRIKATA_MINOR}ubuntu${SIRIKATA_DEBIAN}_source.changes

Installing

The Easy Way

 sudo add-apt-repository ppa:sirikata/sirikata
 sudo apt-get update
 sudo apt-get install sirikata

The Manual Way

Put this:

 deb http://ppa.launchpad.net/sirikata/sirikata/ubuntu oneiric main

in this file:

 /etc/apt/sources.list.d/sirikata.list

Then run:

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E3BB648B583006F3
 sudo apt-get update
 sudo apt-get install sirikata