Sha256: 1e38ac47788d2c31358d45098a88ae081240fa95acde5c9ef26618ed0e06e2d4

Contents?: true

Size: 817 Bytes

Versions: 1

Compression:

Stored size: 817 Bytes

Contents

# file: lib/rip/commands/build.rb
#
# rip build
# Builds Ruby extensions for installed packages

module Rip
  module Commands
    def build(options={}, *packages)
      packages.each do |package_name|
        package = manager.package(package_name)
        alerted = false

        Dir["#{package.cache_path}/**/extconf.rb"].each do |build_file|
          if !alerted
            ui.puts "rip: building #{package_name}"
            alerted = true
          end

          build_dir = File.dirname(build_file)
          Dir.chdir(build_dir) do
            system "ruby extconf.rb"
            system "make install RUBYARCHDIR=#{manager.dir}/lib"
          end
        end

        if !alerted && !options[:quiet]
          ui.puts "rip: don't know how to build #{package_name}"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rip-0.0.2 lib/rip/commands/build.rb