24 lines
510 B
Crystal
24 lines
510 B
Crystal
|
|
class Package::Backend::Install
|
|
def self.make : Backend::Building
|
|
Backend::Building.new "install", "make" do |context, recipe|
|
|
next BuildStatus::Pass unless Dir.exists? recipe.dirname
|
|
Dir.cd recipe.dirname
|
|
|
|
unless File.exists? "Makefile"
|
|
next BuildStatus::Pass
|
|
end
|
|
|
|
child = Do.sh "make install 'DESTDIR=#{recipe.fake_root_directory}' #{recipe.options["make install"]? || ""}"
|
|
|
|
if child.exit_status == 0
|
|
BuildStatus::Success
|
|
else
|
|
BuildStatus::Failed
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|