I've been writing a multiplatform packaging tool for the company I work
for, dubbed "pallet". I recently got the go-ahead to release it on
RubyForge under the LGPL, so have spent the past day or so getting it up
on there.

Essentially, pallet lets you use a simple Rakefile stanza (akin to the
existing gemspec stanza) to define multiple packaging formats. Right now,
gem and dpkg are the only formats supported, although adding .tar.gz
should be trivial, and .rpm should be simple enough for anyone who's built
an RPM.

An example of the format, from pallet's own Rakefile:

  Pallet.new('pallet', Pallet::VERSION) do |p|
  
    p.author  = 'Stephen Touset'
    p.email   = 'stouset / damballa.com'
    p.summary = 'Automated packaging tool for different languages and OSes'
  
    p.packages << Pallet::Gem.new(p) do |gem|
      gem.depends = ['rake']
      gem.requirements = ['fakeroot', 'dpkg-dev']
      gem.files.include FileList['share/**/*']
    end
  
    p.packages << Pallet::Deb.new(p) do |deb|
      deb.architecture = 'all'
      deb.depends      = ['rake', 'fakeroot', 'dpkg-dev']
      deb.files        = [InstallSpec['lib',   '/usr/lib/ruby/1.8'],
                          InstallSpec['share', '/usr/share/pallet'],]
      deb.commands.document = 'rake doc'
    end
  
  end

It doesn't support every single possible feature of every packaging
system, but it's close enough for 99% of projects. Nearly thirty of our
own internal software projects were ported over to it as part of our build
system in a matter of hours by two developers with no previous experience
with either the packaging systems or pallet.

One nice ability is that it should require no more than maybe ten lines to
build a Debian package that simply contains a gem that is
installed/uninstalled from rubygems by postinst/prerm scripts in the
Debian package. In a future release, I expect to make this a trivial
use-case, through something like

  p.packages << Pallet::Deb.new(p, :include => :gem)

It is extensively rdoc'd, available as "pallet" from rubygems, and can be
downloaded as a dpkg or a gem from http://rubyforge.org/projects/pallet/

Happy packing!

-- 
Stephen Touset <stephen / touset.org>