lib/cany/dpkg/builder.rb in cany-0.0.2 vs lib/cany/dpkg/builder.rb in cany-0.1.0

- old
+ new

@@ -9,29 +9,17 @@ attr_reader :spec def initialize(spec) @spec = spec end - def debian(*args) - File.join spec.base_dir, 'debian', *args - end - # This method is called to do the actual work # @api public # @param [String] build_step_name The name of the dpkg build step (clean, build, binary) def run(build_step_name) - setup_recipes - @recipes.first.send build_step_name.to_s - end - - # @api private - # This method creates recipe instances for all required recipes from the given spec. - def setup_recipes - @recipes = [] - @recipes << DebHelperRecipe.new(spec, nil) - spec.recipes.reverse.each do |name| - @recipes.unshift Recipe.from_name(name).new(spec, @recipes.first) - end + spec.system_recipe = DebHelperRecipe.new spec + spec.setup_recipes + spec.system_recipe.exec 'dh_prep' if build_step_name.to_s == 'binary' + spec.recipes.first.send build_step_name.to_s end end end end