packaging.spec configuration example, few comments in src/context.cr
This commit is contained in:
parent
7924f15376
commit
5ad65f00ec
35
packaging.spec
Normal file
35
packaging.spec
Normal file
@ -0,0 +1,35 @@
|
||||
# /etc/packaging.spec configuration file
|
||||
|
||||
# where to send built packages
|
||||
packages-directory: /usr/local/baguette/pkg/
|
||||
# where to download sources
|
||||
sources-directory: /usr/local/baguette/src/
|
||||
|
||||
# the slot we want for our packages
|
||||
slotting: /usr/baguette
|
||||
|
||||
# prefixes for `packaging` running environment and child processes
|
||||
# a.k.a. where to search for binaries during the build
|
||||
prefixes:
|
||||
- /usr/baguette/
|
||||
- /
|
||||
|
||||
# list of environment variables when building
|
||||
environment:
|
||||
# we may choose another compiler, provide some CFLAGS, etc.
|
||||
- CC: clang
|
||||
- CFLAGS: -Os -Wall
|
||||
|
||||
# next three parameters have special meaning
|
||||
# to provide parameters to the `./configure` script when building
|
||||
- configure: --disable-nls --without-gettext
|
||||
|
||||
# to provide parameters to the `make` command
|
||||
- make:
|
||||
|
||||
# to provide parameters to the final `make install` command
|
||||
- make install:
|
||||
|
||||
# wanna build for another system? not a problem, just add the back-end (we currently have `apk` and `package`)
|
||||
package-manager: package
|
||||
|
@ -58,7 +58,11 @@ class Package::Context
|
||||
# but it’ll be kind of enough for now.
|
||||
property architecture = "x86_64"
|
||||
|
||||
# prefixes for `packaging` running environment and child processes
|
||||
# = where to search for binaries and libraries for the build
|
||||
property prefixes = ["/usr", "/", "/usr/baguetteos"]
|
||||
|
||||
# list of environment variables we want to have when building
|
||||
property environment = {} of String => String
|
||||
|
||||
property verbosity = 0
|
||||
@ -259,8 +263,10 @@ class Package::Context
|
||||
when "sources-directory"
|
||||
@sources_directory = value.as_s
|
||||
when "prefixes"
|
||||
# Prefixes during the build process.
|
||||
@prefixes = value.as_a_or_s
|
||||
when "environment"
|
||||
# Environment variables during the build process.
|
||||
value.as_a_or_s.each do |entry|
|
||||
match = entry.split(':').map(
|
||||
&.gsub(/^[ \t]*/, "").gsub(/[ \t]*$/, ""))
|
||||
@ -274,6 +280,7 @@ class Package::Context
|
||||
@environment[key] = value
|
||||
end
|
||||
when "package-manager"
|
||||
# Targeted package manager (default: package, for BaguetteOS).
|
||||
self.packaging_backend = value.as_s
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user