Browse Source

working directory now configurable

master
Karchnu 1 year ago
parent
commit
4decf96f10
  1. 3
      packaging.spec
  2. 6
      src/context.cr

3
packaging.spec

@ -5,6 +5,9 @@ packages-directory: /usr/local/baguette/pkg/ @@ -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

6
src/context.cr

@ -43,7 +43,7 @@ def pkginfo(package) @@ -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 @@ -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 @@ -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