Skip to content

Latest commit

 

History

History
72 lines (72 loc) · 3.63 KB

recipes.md

File metadata and controls

72 lines (72 loc) · 3.63 KB

Recipe format

Examples can be found under tests/recipes

Valid JSON fields in a package recipe:

name: string (required)

  • The name of the package.

description: string (optional)

  • A light description of the package.

version: string

  • The current package version
  • The version is defined as follows:
"version": [ major,minor,patch ]

git-url: string

  • The URL of the git repo to clone

git-commit: string (required if git-url is present)

  • The commit to checkout

url: string

  • The URL to an archive. This archive must be of format '.tar.*'.

depends: string array (required)

  • Dependencies of the project at runtime. These dependencies are included in the xbps package

build-depends: string arrays (required)

  • Dependencies of the package at compile time. These Dependencies are not included in the xbps package

patches: patch array (optional)

  • An array of patches that should be applied before bootstrap commands are run.
  • A patch is defined as follows:
"patches": [
    {
        "modifies": "path/to/file",
        "patch": "path/to/patch",
	    "delete-file": 0,
    }
]
  • The "modifies" field is relative to ${repo_directory}
  • The "patch" field is relative to the directory obos-strap was run in.
  • The "delete-file" field specifies whether to delete $modifies before patching, can be either zero or one. Optional field. (default: 0)
  • Patches should be generated as if they were generated with diff -u FILE1 FILE2

bootstrap-commands: array of string arrays (required)

  • Commands run to "bootstrap" the build. These commands will be run under ${bootstrap_directory}/${name}/

build-commands: array of string arrays (required)

  • Commands run to build the package. These commands will be run under ${bootstrap_directory}/${name}/

install-commands: array of string arrays (required)

  • Commands run to install the package into ${prefix_directory}. These commands will be run under ${bootstrap_directory}/${name}/

run-commands: array of string arrays (optional)

  • Commands run when obos-strap run is executed on the package. These commands will be run in the directory obos-strap was run in.

host-package: boolean (optional, defaults to false)

  • Whether this package is a host package or target package. Ignored if not cross compiling.

inhibit-auto-rebuild: boolean (optional, defaults to false)

  • Whether obos-strap is allowed to automatically rebuild this package.

host-provides: string (optional, defaults to nothing)

  • The name of an executable that this host package provides, to avoid rebuilding compilers, or other packages that are only needed once.

Valid substitution strings in commands:

bootstrap_directory: Output of bootstrap commands goes here, as well as built binaries
               name: The name field of the package.
        description: The description field of the package.
     repo_directory: Cloned repositories and decompressed archives.
     root_directory: Repository root directory.
             prefix: The prefix directory. This can change depending on whether this is a host package or not.
        host_prefix: The host prefix directory.
      target_prefix: The target prefix directory.
            destdir: The DESTDIR for target packages.
              nproc: The CPU count of the system.
     target_triplet: The target triplet.
       host_triplet: The host triplet.
 bin_package_prefix: The directory in which files should be installed for binary packages
            version: The package version
  • To access these, do ${insert_name_here}
  • To access an environment variable, do $ENV