This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
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|
|
2019-07-03 03:35:35 +02:00
|
|
|
context.packaging_backend = "pkgutils"
|
|
|
|
|
2019-07-02 03:50:50 +02:00
|
|
|
# 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"
|
|
|
|
|
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-03 03:17:01 +02:00
|
|
|
recipe.download
|
|
|
|
recipe.extract
|
|
|
|
|
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
|
|
|
|
|