diff options
Diffstat (limited to 'doc/examples/composition/elements')
-rw-r--r-- | doc/examples/composition/elements/base.bst | 5 | ||||
-rw-r--r-- | doc/examples/composition/elements/base/alpine.bst | 31 | ||||
-rw-r--r-- | doc/examples/composition/elements/hello.bst | 22 | ||||
-rw-r--r-- | doc/examples/composition/elements/libhello.bst | 22 | ||||
-rw-r--r-- | doc/examples/composition/elements/runtime-only.bst | 23 |
5 files changed, 103 insertions, 0 deletions
diff --git a/doc/examples/composition/elements/base.bst b/doc/examples/composition/elements/base.bst new file mode 100644 index 000000000..1b85a9e8c --- /dev/null +++ b/doc/examples/composition/elements/base.bst @@ -0,0 +1,5 @@ +kind: stack +description: Base stack + +depends: +- base/alpine.bst diff --git a/doc/examples/composition/elements/base/alpine.bst b/doc/examples/composition/elements/base/alpine.bst new file mode 100644 index 000000000..be89f656f --- /dev/null +++ b/doc/examples/composition/elements/base/alpine.bst @@ -0,0 +1,31 @@ +kind: import +description: | + + Alpine Linux base runtime + +sources: +- kind: tar + url: alpine:integration-tests-base.v1.x86_64.tar.xz + ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639 + +public: + bst: + # + # Run ldconfig in the libdir before running anything + # + integration-commands: + - ldconfig "%{libdir}" + + # + # Extend the runtime split-rule domain for this element, + # such that we capture the runtime linker. + # + # There are various other things provided by this runtime + # such as tooling in /bin and an installation of python + # and perl, but we'll overlook these for the sake of + # this example. + # + split-rules: + runtime: + (>): + - "/lib/ld*.so*" diff --git a/doc/examples/composition/elements/hello.bst b/doc/examples/composition/elements/hello.bst new file mode 100644 index 000000000..c90254f10 --- /dev/null +++ b/doc/examples/composition/elements/hello.bst @@ -0,0 +1,22 @@ +kind: manual +description: | + + The hello application + +# Depend on the hello library +depends: +- libhello.bst + +# Stage the files/hello directory for building +sources: + - kind: local + path: files/hello + +# Now configure the commands to run +config: + + build-commands: + - make PREFIX="%{prefix}" + + install-commands: + - make -j1 PREFIX="%{prefix}" DESTDIR="%{install-root}" install diff --git a/doc/examples/composition/elements/libhello.bst b/doc/examples/composition/elements/libhello.bst new file mode 100644 index 000000000..53496c84c --- /dev/null +++ b/doc/examples/composition/elements/libhello.bst @@ -0,0 +1,22 @@ +kind: manual +description: | + + The libhello library + +# Depend on the base system +depends: +- base.bst + +# Stage the files/libhello directory for building +sources: + - kind: local + path: files/libhello + +# Now configure the commands to run +config: + + build-commands: + - make PREFIX="%{prefix}" + + install-commands: + - make -j1 PREFIX="%{prefix}" DESTDIR="%{install-root}" install diff --git a/doc/examples/composition/elements/runtime-only.bst b/doc/examples/composition/elements/runtime-only.bst new file mode 100644 index 000000000..9885b7396 --- /dev/null +++ b/doc/examples/composition/elements/runtime-only.bst @@ -0,0 +1,23 @@ +kind: compose + +# Dependencies of a compose element cannot be transient, +# we can only build-depend on the inputs of a composition. +# +build-depends: +- hello.bst + +config: + + # Only include files from the runtime domain + # + include: + - runtime + + # Don't include any files which do not match any existing + # split rule domains. + # + include-orphans: False + + # Run integration commands before composition + # + integrate: True |