Differences between revisions 15 and 16
Revision 15 as of 2015-09-14 10:50:38
Size: 3930
Editor: ?Abhijith Balan
Comment:
Revision 16 as of 2015-09-14 11:14:00
Size: 3934
Editor: ?Abhijith Balan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
A pdf file which contains the info if a gem is already packaged is to be found here: -(A pdf file which contains the info if a gem is already packaged is to be found here:
Line 32: Line 32:
 * [[http://people.debian.org/~boutil/diaspora/|deps.pdf]]  * [[http://people.debian.org/~boutil/diaspora/|deps.pdf]])-

Translation(s): none


Building with gem2deb

Choose a package

Go to piratepad and choose a package you want to build. Make sure no one else is working with it already.

Use apt-cache to check if it is already packaged for Debian

apt-cache search devise ruby

"devise" being an example. Replace it with the package you are working with.

In case you are not running Sid you can also check at:

and make sure you choose "unstable" for Distribution. Check at

if someone is already packaging it. Also check it with

wnpp-check devise

-(A pdf file which contains the info if a gem is already packaged is to be found here:

Make sure to use an actual version. You will have to check the wnpp site or with wnpp-check anyway.

Setup your environment

Add the following variables in your ~/.bashrc file

export DEBEMAIL=your@email.domain
export DEBFULLNAME='Your Name'
alias lintian='lintian -iIEcv --pedantic --color auto'
alias git-import-dsc='git-import-dsc --author-is-committer --pristine-tar'
alias clean='fakeroot debian/rules clean'

and update your current environment by running

$ source ~/.bashrc

Build the package

First you need install gem2deb

apt-get install gem2deb

Create a build directory and go there

mkdir -p ~/Build/diaspora-packaging && cd $_

You might also want to create a directory for your package

mkdir build_devise && cd $_

and then run

gem2deb devise

will run "gem fetch devise" to download the package. If you get an error that the Test failed, see ruby tests for hints to solve it.

Note: To fetch rails-assets-* gems, you need to provide a different gem source like this example

Now you have to edit files like

  • copyright
  • control
  • changelog

You will find such info at

and the homepage of the package. The homepage you will find at rubygems too.

Note: Read http://www.debian.org/doc/manuals/maint-guide/dreq.en.html to learn more about each file.

Once that is done build the package with

dpkg-buildpackage

If you get an error that it could not be signed, ignore it for now.

And when it has finished check for lintian errors:

lintian -iIEcv --pedantic --color auto ../ruby-devise*.changes

If you get errors, you have to correct them. Then run dpkg-buildpackage again and test with lintian again.

Rails engines

If your package has a app/assets or vendor/assets (if the gem name starts with rails-assets or ends at rails) then your package is a rails engine. More about rails engines

  1. Install app or vendor in /usr/share/<package name> using debian/install

  2. Set rails engine root with quilt to /usr/share/<package name>

  3. Add a smoke test

Javascripts should be packaged as libjs-<js library name> if it is not packaged already (create a new binary package in debian/control and add 'Section: web' and create libjs-<js library name>.install).

Declare dependency on libjs-<js library name> and create a <package name>.links file.

Refer to ruby-rails-assets-favico.js] package for an example.