blob: e0e7673b4d9336e3190a6992b626319487f96ec2 [file] [log] [blame]
Radek Krejcicd6b8682016-07-15 10:42:19 +02001#install dependencies using homebrew
2brew update
Radek Krejcida3c2212016-07-15 12:49:13 +02003brew upgrade openssl
Radek Krejcicd6b8682016-07-15 10:42:19 +02004brew install pcre
5
6set -e
7
8INSTALL_PREFIX_DIR=$HOME/local
9export PKG_CONFIG_PATH=$INSTALL_PREFIX_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
10
11# use cache if present
12if [ ! -d "$INSTALL_PREFIX_DIR/lib" ]; then
13 echo "Building cache."
14 cd ~
15
16 # libssh
17 wget https://git.libssh.org/projects/libssh.git/snapshot/libssh-0.7.3.tar.bz2
18 tar -xjf libssh-0.7.3.tar.bz2
19 mkdir libssh-0.7.3/build && cd libssh-0.7.3/build
20 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
21 cd ../..
22
23 # CMocka
24 wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz
25 tar -xJf cmocka-1.0.1.tar.xz
26 mkdir cmocka-1.0.1/build && cd cmocka-1.0.1/build
27 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
28 cd ../..
29
30else
31 echo "Using cache ($INSTALL_PREFIX_DIR)."
32fi
33
34git clone -b $TRAVIS_BRANCH https://github.com/CESNET/libyang.git
35mkdir libyang/build && cd libyang/build
36cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
37cd ../..
38