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 |
Michal Vasko | c0541c8 | 2016-07-20 11:56:00 +0200 | [diff] [blame^] | 4 | brew link --force openssl |
Radek Krejci | cd6b868 | 2016-07-15 10:42:19 +0200 | [diff] [blame] | 5 | brew install pcre |
| 6 | |
| 7 | set -e |
| 8 | |
| 9 | INSTALL_PREFIX_DIR=$HOME/local |
| 10 | export PKG_CONFIG_PATH=$INSTALL_PREFIX_DIR/lib/pkgconfig:$PKG_CONFIG_PATH |
| 11 | |
| 12 | # use cache if present |
| 13 | if [ ! -d "$INSTALL_PREFIX_DIR/lib" ]; then |
| 14 | echo "Building cache." |
| 15 | cd ~ |
| 16 | |
| 17 | # libssh |
| 18 | wget https://git.libssh.org/projects/libssh.git/snapshot/libssh-0.7.3.tar.bz2 |
| 19 | tar -xjf libssh-0.7.3.tar.bz2 |
| 20 | mkdir libssh-0.7.3/build && cd libssh-0.7.3/build |
Michal Vasko | 28c2663 | 2016-07-20 11:22:16 +0200 | [diff] [blame] | 21 | cmake -DCMAKE_SHARED_LINKER_FLAGS=-L/usr/local/opt/openssl/lib -DCMAKE_C_FLAGS=-I/usr/local/opt/openssl/include -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
Radek Krejci | cd6b868 | 2016-07-15 10:42:19 +0200 | [diff] [blame] | 22 | cd ../.. |
| 23 | |
| 24 | # CMocka |
| 25 | wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz |
| 26 | tar -xJf cmocka-1.0.1.tar.xz |
| 27 | mkdir cmocka-1.0.1/build && cd cmocka-1.0.1/build |
| 28 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 29 | cd ../.. |
| 30 | |
| 31 | else |
| 32 | echo "Using cache ($INSTALL_PREFIX_DIR)." |
| 33 | fi |
Michal Vasko | 28c2663 | 2016-07-20 11:22:16 +0200 | [diff] [blame] | 34 | |
Radek Krejci | cd6b868 | 2016-07-15 10:42:19 +0200 | [diff] [blame] | 35 | git clone -b $TRAVIS_BRANCH https://github.com/CESNET/libyang.git |
| 36 | mkdir libyang/build && cd libyang/build |
| 37 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 38 | cd ../.. |
| 39 | |