summaryrefslogtreecommitdiffstats
path: root/examples/packages/example_3/pkg.toml
blob: f90806577ba26c0faa47eae2ae7632db21972c1e (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version           = "1"
version_is_semver = false

# no patches by default
patches = []

[sources.src]
url       = "https://github.com/user/repo/archive/sources.tar.gz"
hash.type = "sha1"
hash.hash = "5e8bcaa3c758f84f01935a914e2bbf01309462ae"

[dependencies]
build           = []
runtime         = []

# Root description of phases
# can be overridden as well
[phases]

unpack.script = '''
    {{#each sources}}
    echo "{{@key}}  {{this.url}}"
    echo "          {{this.hash.hash}}"
    ls /inputs/{{@key}}-{{this.hash.hash}}.source
    {{/each}}

    mkdir /build
    echo "#BUTIDO:PHASE:unpack"
'''

# We use a depinst phase here because we don't want to add a Dockerfile to the
# repo where we prepare a build container.
# This is, of course, not be the way it would be done in a real-world scenario!
depinst.script = '''
    {{phase "depinst"}}
    {{progress 0}}
    for n in {1..10}; do sleep 0.1; done
    {{progress 10}}
'''

configure.script = '''
    {{phase "configure-preparing"}}
    for n in {1..10}; do sleep 0.1; done

    {{progress 20}}
    for n in {1..10}; do sleep 0.1; done
'''

build.script = '''
    {{phase "build"}}

    for n in {1..10}; do sleep 0.1; done

    echo "#BUTIDO:PROGRESS:60"
    {{progress 60}}
'''

install.script = '''
    {{phase "install"}}
    for n in {1..10}; do sleep 0.1; done

    {{progress 80}}
'''