diff options
Diffstat (limited to 'examples/packages/example_tmux/pkg.toml')
-rw-r--r-- | examples/packages/example_tmux/pkg.toml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/examples/packages/example_tmux/pkg.toml b/examples/packages/example_tmux/pkg.toml new file mode 100644 index 0000000..7d4119e --- /dev/null +++ b/examples/packages/example_tmux/pkg.toml @@ -0,0 +1,62 @@ +name = "tmux" +version = "3.1c" +version_is_semver = false + +# no patches by default +patches = [] + +[source] +url = "https://github.com/tmux/tmux/archive/3.1c.tar.gz" +hash.type = "sha1" +hash.hash = "5e8bcaa3c758f84f01935a914e2bbf01309462ae" + + +[dependencies] +system = ["libevent"] +system_runtime = [] +build = [] +runtime = [] + +# Root description of phases +# can be overridden as well +[phases] + +unpack.script = ''' + mkdir /build + tar -C /build -xzf /inputs/*source +''' + +# 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 = ''' + apt update + apt install -y pkg-config gcc bison make autotools-dev autoconf libevent-dev libncurses5-dev +''' + +configure.script = ''' + cd /build/tmux-3.1c/ + echo "SOURCES: " + ls + echo "-----" + + ./autogen.sh || exit 1 + ./configure || exit 1 +''' + +build.script = ''' + cd /build/tmux-3.1c + make || exit 1 +''' + +install.script = ''' + cd /build/tmux-3.1c + make install || exit 1 +''' + +package.script = ''' + # I am simple + mkdir /outputs/ + tar czf /outputs/tmux-3.1c.tgz /usr/local/bin/tmux +''' + |