[DRE-commits] [SCM] gem2deb.git branch, master, updated. bc726b5c7141733195e217a16aab61c5c4c50cf7
David Greaves
david at dgreaves.com
Wed Apr 6 09:13:32 UTC 2011
The following commit has been merged in the master branch:
commit 7a145f1111bdaab128b4fc5d6f88b363b5694a00
Author: David Greaves <david at dgreaves.com>
Date: Tue Apr 5 17:00:11 2011 +0100
Add support for env-var DH_RUBY_GEMSPEC to specify the .gemspec.
In particular this supports gems with multiple .gemspecs (eg ruby-amqp)
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index 90ceae0..919e0b4 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright © 2011, Lucas Nussbaum <lucas at debian.org>
#
# This program is free software: you can redistribute it and/or modify
@@ -384,6 +385,9 @@ Description: <%= short_description ? short_description : 'FIXME' %>
# Uncomment to ignore some test failures (but the tests will run anyway).
# Valid values:
#export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
+#
+# If you need to specify the .gemspec (eg there is more than one)
+#export DH_RUBY_GEMSPEC=gem.gemspec
%:
dh $@ --buildsystem=ruby --with ruby
diff --git a/lib/gem2deb/metadata.rb b/lib/gem2deb/metadata.rb
index d64bccf..0888205 100644
--- a/lib/gem2deb/metadata.rb
+++ b/lib/gem2deb/metadata.rb
@@ -49,6 +49,8 @@ module Gem2Deb
def load_gemspec
if File.exists?('metadata.yml')
@gemspec = YAML.load_file('metadata.yml')
+ elsif ENV['DH_RUBY_GEMSPEC']
+ @gemspec = Gem::Specification.load(ENV['DH_RUBY_GEMSPEC'])
else
gemspec_files = Dir.glob('*.gemspec')
if gemspec_files.size == 1
--
gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list