Permalink
Browse files

Experimental support for Travis source install

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...
1 parent 6c43c10 commit 3ee14c386f937ca55604438004b1ca78f0e20a40 @avsm avsm committed Feb 16, 2014
Showing with 7 additions and 0 deletions.
  1. +4 −0 .travis-ci.sh
  2. +3 −0 packages/sodium/sodium.0.1.0/opam
View
@@ -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
@@ -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.