Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-master} |
| 4 | NFD_COMMIT=${NFD_COMMIT:-master} |
| 5 | |
| 6 | GIT=${GIT:-https://github.com/named-data} |
| 7 | |
| 8 | mkdir build 2>/dev/null || true |
| 9 | path="$(pwd)" |
| 10 | |
| 11 | ####################################### |
| 12 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 13 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 14 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 15 | pushd build/ndn-cxx |
| 16 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame^] | 17 | |
| 18 | patch -p1 <<EOF |
| 19 | diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp |
| 20 | index 59c00ae..aa67b24 100644 |
| 21 | --- a/src/transport/unix-transport.cpp |
| 22 | +++ b/src/transport/unix-transport.cpp |
| 23 | @@ -74,7 +74,7 @@ UnixTransport::getDefaultSocketName(const ConfigFile& config) |
| 24 | } |
| 25 | |
| 26 | // Assume the default nfd.sock location. |
| 27 | - return "/var/run/nfd.sock"; |
| 28 | + return "/tmp/nfd.sock"; |
| 29 | } |
| 30 | |
| 31 | shared_ptr<UnixTransport> |
| 32 | @@ -135,4 +135,4 @@ UnixTransport::resume() |
| 33 | |
| 34 | } |
| 35 | |
| 36 | -#endif // _WIN32 |
| 37 | \ No newline at end of file |
| 38 | +#endif // _WIN32 |
| 39 | EOF |
| 40 | |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 41 | ./waf configure --prefix="${path}/build/deps" |
| 42 | ./waf build |
| 43 | ./waf install |
| 44 | popd |
| 45 | |
| 46 | #################################### |
| 47 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 48 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 49 | git clone ${GIT}/NFD build/NFD |
| 50 | pushd build/NFD |
| 51 | git checkout ${NFD_COMMIT} |
| 52 | git submodule update --init |
| 53 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 54 | ./waf configure --prefix="${path}/build/deps" |
| 55 | ./waf build |
| 56 | ./waf install |
| 57 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame^] | 58 | |
| 59 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 60 | ./waf configure |