Skip to content

Commit

Permalink
Experimental support for Travis source install
Browse files Browse the repository at this point in the history
If a package defines a depext with the `["source" "linux"]` tags,
it will be treated as a URL and piped through a shell.  This script
should download and install any external source dependencies
required.

This depext is run *after* any binary depexts, so they can install
prerequisite libraries.

This commit includes a working sodium.0.1.0 as an example.
  • Loading branch information
avsm committed Feb 16, 2014
1 parent 6c43c10 commit 3ee14c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis-ci.sh
Expand Up @@ -66,6 +66,10 @@ function build_one {
if [ "$depext" != "" ]; then
sudo apt-get install -qq pkg-config build-essential m4 $depext
fi
srcext=`opam install $pkg -e source,linux`
if [ "$srcext" != "" ]; then
curl -s ${srcext} | bash
fi
opam install $pkg
opam remove $pkg
if [ "$depext" != "" ]; then
Expand Down
3 changes: 3 additions & 0 deletions packages/sodium/sodium.0.1.0/opam
Expand Up @@ -11,3 +11,6 @@ depends: [
"ocamlfind"
"ctypes" {>= "0.1.1"}
]
depexts: [
[ ["source" "linux"] ["https://gist.github.com/avsm/9037146/raw"] ]
]

0 comments on commit 3ee14c3

Please sign in to comment.