This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
packaging/src/backends/install.cr

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