summaryrefslogtreecommitdiffstats
path: root/examples/packages/1/pkg.toml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/packages/1/pkg.toml')
-rw-r--r--examples/packages/1/pkg.toml65
1 files changed, 65 insertions, 0 deletions
diff --git a/examples/packages/1/pkg.toml b/examples/packages/1/pkg.toml
new file mode 100644
index 0000000..f908065
--- /dev/null
+++ b/examples/packages/1/pkg.toml
@@ -0,0 +1,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}}
+'''
+
+