Radek Krejci | cd6b868 | 2016-07-15 10:42:19 +0200 | [diff] [blame] | 1 | #install dependencies using homebrew |
| 2 | brew update |
Radek Krejci | da3c221 | 2016-07-15 12:49:13 +0200 | [diff] [blame^] | 3 | brew upgrade openssl |
Radek Krejci | cd6b868 | 2016-07-15 10:42:19 +0200 | [diff] [blame] | 4 | brew install pcre |
| 5 | |
| 6 | set -e |
| 7 | |
| 8 | INSTALL_PREFIX_DIR=$HOME/local |
| 9 | export PKG_CONFIG_PATH=$INSTALL_PREFIX_DIR/lib/pkgconfig:$PKG_CONFIG_PATH |
| 10 | |
| 11 | # use cache if present |
| 12 | if [ ! -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 | |
| 30 | else |
| 31 | echo "Using cache ($INSTALL_PREFIX_DIR)." |
| 32 | fi |
| 33 | |
| 34 | git clone -b $TRAVIS_BRANCH https://github.com/CESNET/libyang.git |
| 35 | mkdir libyang/build && cd libyang/build |
| 36 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 37 | cd ../.. |
| 38 | |