summaryrefslogtreecommitdiff
path: root/buildstream/data/build-module.sh.in
blob: d67ee9a9e3aac630cbf169c8c0aba2350933de68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/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}'

cp -a "$SRCDIR/{name}/." '{build_root}'
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 /)