blob: 1e0fdd7093cfcf687ec039c66c0e94950516e1ad [file] [log] [blame]
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07001#!/usr/bin/env bash
2set -x
Vince Lehman0a7da612014-10-29 14:39:29 -05003set -e
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07004
Alexander Afanasyevf9f39102015-12-01 17:43:40 -08005JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
7
Alexander Afanasyev24ed83a2015-03-30 11:06:50 -07008pushd /tmp >/dev/null
9
Alexander Afanasyevf9f39102015-12-01 17:43:40 -080010NDN_CXX_FOLDER=ndn-cxx-0.4.0-beta2-11-ge3e2505
Alexander Afanasyev24ed83a2015-03-30 11:06:50 -070011
Alexander Afanasyevf9f39102015-12-01 17:43:40 -080012sudo rm -Rf "$NDN_CXX_FOLDER"
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -070013
14sudo rm -Rf /usr/local/include/ndn-cxx
15sudo rm -f /usr/local/lib/libndn-cxx*
16sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
17
Alexander Afanasyevf9f39102015-12-01 17:43:40 -080018mkdir "$NDN_CXX_FOLDER"
19pushd "$NDN_CXX_FOLDER" > /dev/null
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -070020
Alexander Afanasyevf9f39102015-12-01 17:43:40 -080021git init
22git fetch https://github.com/named-data/ndn-cxx master && git checkout e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba
23
24./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -070025./waf -j1 --color=yes
Alexander Afanasyev24ed83a2015-03-30 11:06:50 -070026sudo ./waf install -j1 --color=yes
27
28popd >/dev/null
29popd >/dev/null
Alexander Afanasyevf9f39102015-12-01 17:43:40 -080030
31if has Linux $NODE_LABELS; then
32 sudo ldconfig
33elif has FreeBSD $NODE_LABELS; then
34 sudo ldconfig -a
35fi