summaryrefslogtreecommitdiff
path: root/src/buildstream/data/build-module.sh.in
blob: 6e9ea455247f8dea1e355c0fdd4ed9e5a51f0627 (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
42
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 /)