[DRE-commits] [SCM] gem2deb.git branch, master, updated. debian/0.2.3-4-gfb547d8
Antonio Terceiro
terceiro at softwarelivre.org
Wed May 11 19:19:56 UTC 2011
The following commit has been merged in the master branch:
commit fb547d84b5545ac5dee8de9023ccae51d5cf61da
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Wed May 11 12:17:36 2011 -0700
Extract build/install logic into its own method.
This method could be overriden by subclasses to provide different
methods of building/installing (hint hint ;-))
diff --git a/lib/gem2deb/dh_ruby.rb b/lib/gem2deb/dh_ruby.rb
index c151f4c..298ed4f 100644
--- a/lib/gem2deb/dh_ruby.rb
+++ b/lib/gem2deb/dh_ruby.rb
@@ -103,11 +103,26 @@ module Gem2Deb
package = packages.first
+ install_files_and_build_extensions(package, supported_versions)
+
+ run_tests(supported_versions)
+
+ install_substvars(package, supported_versions)
+
+ update_shebangs(package)
+
+ check_rubygems
+
+ puts " Leaving dh_ruby --install" if @verbose
+ end
+
+ protected
+
+ def install_files_and_build_extensions(package, supported_versions)
install_files('bin', find_files('bin'), File.join(destdir_for(package), @bindir), 755) if File::directory?('bin')
install_files('lib', find_files('lib'), File.join(destdir_for(package), RUBY_CODE_DIR), 644) if File::directory?('lib')
-
if metadata.has_native_extensions?
supported_versions.each do |rubyver|
puts "Building extension for #{rubyver} ..." if @verbose
@@ -122,22 +137,8 @@ module Gem2Deb
end
end
end
-
- run_tests(supported_versions)
-
- install_substvars(package, supported_versions)
-
- update_shebangs(package)
-
- # FIXME after install, check for require 'rubygems' and other stupid things, and
- # issue warnings
-
- check_rubygems
- puts " Leaving dh_ruby --install" if @verbose
end
- protected
-
def remove_duplicate_files(src, dst)
candidates = (Dir::entries(src) & Dir::entries(dst)) - ['.', '..']
candidates.each do |cand|
--
gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list