diff options
Diffstat (limited to 'src/buildstream/data/build-module.sh.in')
-rw-r--r-- | src/buildstream/data/build-module.sh.in | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/buildstream/data/build-module.sh.in b/src/buildstream/data/build-module.sh.in new file mode 100644 index 000000000..6e9ea4552 --- /dev/null +++ b/src/buildstream/data/build-module.sh.in @@ -0,0 +1,43 @@ +#!/bin/sh +# +# DO NOT EDIT THIS FILE +# +# This is a build script generated by +# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/). +# +# Builds the module {name}. + +set -e + +# Prepare the build environment +echo 'Building {name}' + +if [ -d '{build_root}' ]; then + rm -rf '{build_root}' +fi + +if [ -d '{install_root}' ]; then + rm -rf '{install_root}' +fi + +mkdir -p '{build_root}' +mkdir -p '{install_root}' + +if [ -d "$SRCDIR/{name}/" ]; then + cp -a "$SRCDIR/{name}/." '{build_root}' +fi +cd '{build_root}' + +export PREFIX='{install_root}' + +export {variables} + +# Build the module +{commands} + +rm -rf '{build_root}' + +# Install the module +echo 'Installing {name}' + +(cd '{install_root}'; find . | cpio -umdp /) |