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/main.cr

27 lines
681 B
Crystal
Raw Normal View History

2019-07-02 03:50:50 +02:00
require "./context.cr"
require "./recipe.cr"
extend Package
# FIXME: recipe.clean? context autoclean?
Context.new().tap do |context|
# FIXME: context.new_recipe? context.recipe?
Recipe.new(context, "hello", "2.10").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz"
recipe.download
recipe.extract
2019-07-02 08:47:11 +02:00
#recipe.instructions.configure << "cd hello-#{recipe.version} && ./configure"
#recipe.instructions.build << "cd hello-#{recipe.version} && make"
2019-07-02 03:50:50 +02:00
recipe.instructions.install << "cd hello-#{recipe.version} && make DESTDIR='${PKG}' install"
2019-07-02 08:47:11 +02:00
raise "oh no, build failed" unless recipe.build
2019-07-02 03:50:50 +02:00
recipe.package
recipe.clean
end
end