From 4decf96f1060e01a288629f192e424556168bae0 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Mon, 22 Feb 2021 00:31:51 +0100 Subject: [PATCH] working directory now configurable --- packaging.spec | 3 +++ src/context.cr | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packaging.spec b/packaging.spec index eb40f8a..be4be70 100644 --- a/packaging.spec +++ b/packaging.spec @@ -5,6 +5,9 @@ packages-directory: /usr/local/baguette/pkg/ # where to download sources sources-directory: /usr/local/baguette/src/ +# where to build packages +working-directory: /tmp/packaging + # the slot we want for our packages slotting: /usr/baguette diff --git a/src/context.cr b/src/context.cr index 8ccbc77..752f7e2 100644 --- a/src/context.cr +++ b/src/context.cr @@ -43,7 +43,7 @@ def pkginfo(package) end class Package::Context - property working_directory = "/tmp/package" + property working_directory = "/tmp/packaging" property sources_directory = Dir.current property packages_directory = Dir.current @@ -60,7 +60,7 @@ class Package::Context # prefixes for `packaging` running environment and child processes # = where to search for binaries and libraries for the build - property prefixes = ["/usr", "/", "/usr/baguetteos"] + property prefixes = ["/usr", "/", "/usr/baguette"] # list of environment variables we want to have when building property environment = {} of String => String @@ -262,6 +262,8 @@ class Package::Context @packages_directory = value.as_s when "sources-directory" @sources_directory = value.as_s + when "working-directory" + @working_directory = value.as_s when "prefixes" # Prefixes during the build process. @prefixes = value.as_a_or_s