diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-11 20:41:12 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-17 20:58:24 +0900 |
commit | 5e79a84af8e9904f21d70735b61e999cca81ed27 (patch) | |
tree | 11983fcad3fde9a5d6a0dbffdce1e8bb39238515 /doc/examples | |
parent | 35cca7458837aab1ca697beaa865f99f7466ca1c (diff) | |
download | buildstream-5e79a84af8e9904f21d70735b61e999cca81ed27.tar.gz |
doc/examples/junction-includes: Adding new example about includes with junctions
Diffstat (limited to 'doc/examples')
7 files changed, 97 insertions, 0 deletions
diff --git a/doc/examples/junction-includes/elements/hello.bst b/doc/examples/junction-includes/elements/hello.bst new file mode 100644 index 000000000..bdfd1f051 --- /dev/null +++ b/doc/examples/junction-includes/elements/hello.bst @@ -0,0 +1,23 @@ +kind: autotools +description: | + + Hello world example from automake + +variables: + + # The special paths.bst from our subproject is used to + # define the paths of some elements in this project. + # + (@): subproject-junction.bst:include/paths.bst + + # The hello world example lives in the doc/amhello folder. + command-subdir: doc/amhello + +sources: +- kind: tar + url: gnu:automake-1.16.tar.gz + ref: 80da43bb5665596ee389e6d8b64b4f122ea4b92a685b1dbd813cd1f0e0c2d83f + +depends: + - filename: base.bst + junction: subproject-junction.bst diff --git a/doc/examples/junction-includes/elements/subproject-junction.bst b/doc/examples/junction-includes/elements/subproject-junction.bst new file mode 100644 index 000000000..0df4e7646 --- /dev/null +++ b/doc/examples/junction-includes/elements/subproject-junction.bst @@ -0,0 +1,17 @@ +kind: junction + +config: + # Configure the options for subproject + # + # If our project is funky, then it requires + # a blue subproject, otherwise we use a red one. + # + options: + color: red + (?): + - funky == True: + color: blue + +sources: +- kind: local + path: subproject diff --git a/doc/examples/junction-includes/project.conf b/doc/examples/junction-includes/project.conf new file mode 100644 index 000000000..e591b78b1 --- /dev/null +++ b/doc/examples/junction-includes/project.conf @@ -0,0 +1,14 @@ +name: subproject +format-version: 18 +element-path: elements + +aliases: + gnu: http://ftpmirror.gnu.org/gnu/automake/ + +# Define some options for this project +# +options: + funky: + type: bool + description: Whether this project is funky + default: False diff --git a/doc/examples/junction-includes/subproject/elements/base.bst b/doc/examples/junction-includes/subproject/elements/base.bst new file mode 100644 index 000000000..1b85a9e8c --- /dev/null +++ b/doc/examples/junction-includes/subproject/elements/base.bst @@ -0,0 +1,5 @@ +kind: stack +description: Base stack + +depends: +- base/alpine.bst diff --git a/doc/examples/junction-includes/subproject/elements/base/alpine.bst b/doc/examples/junction-includes/subproject/elements/base/alpine.bst new file mode 100644 index 000000000..cf85df5bf --- /dev/null +++ b/doc/examples/junction-includes/subproject/elements/base/alpine.bst @@ -0,0 +1,13 @@ +kind: import +description: | + + Alpine Linux base runtime + +sources: +- kind: tar + + # This is a post doctored, trimmed down system image + # of the Alpine linux distribution. + # + url: alpine:integration-tests-base.v1.x86_64.tar.xz + ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639 diff --git a/doc/examples/junction-includes/subproject/include/paths.bst b/doc/examples/junction-includes/subproject/include/paths.bst new file mode 100644 index 000000000..b9ab2e638 --- /dev/null +++ b/doc/examples/junction-includes/subproject/include/paths.bst @@ -0,0 +1,7 @@ +# When this project color is blue, including this +# file causes installations to be relocated to /opt +# +prefix: /usr +(?): +- color == "blue": + prefix: /opt diff --git a/doc/examples/junction-includes/subproject/project.conf b/doc/examples/junction-includes/subproject/project.conf new file mode 100644 index 000000000..d9387f244 --- /dev/null +++ b/doc/examples/junction-includes/subproject/project.conf @@ -0,0 +1,18 @@ +name: subproject +format-version: 18 +element-path: elements + +aliases: + alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ + +# Define some options for this project +# +options: + color: + type: enum + description: The color of this runtime + values: + - red + - green + - blue + default: blue |