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 | |
Alexander Afanasyev | e1236c7 | 2016-03-21 15:52:09 -0700 | [diff] [blame^] | 11 | pushd build |
| 12 | wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2 |
| 13 | mkdir Sparkle-1.14 || true |
| 14 | pushd Sparkle-1.14 |
| 15 | tar xf ../Sparkle-1.14.0.tar.bz2 |
| 16 | popd |
| 17 | mv Sparkle-1.14/Sparkle.framework . |
| 18 | popd |
| 19 | |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 20 | ####################################### |
| 21 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 22 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 23 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 24 | pushd build/ndn-cxx |
| 25 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 26 | |
| 27 | patch -p1 <<EOF |
| 28 | diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp |
| 29 | index 59c00ae..aa67b24 100644 |
| 30 | --- a/src/transport/unix-transport.cpp |
| 31 | +++ b/src/transport/unix-transport.cpp |
| 32 | @@ -74,7 +74,7 @@ UnixTransport::getDefaultSocketName(const ConfigFile& config) |
| 33 | } |
| 34 | |
| 35 | // Assume the default nfd.sock location. |
| 36 | - return "/var/run/nfd.sock"; |
| 37 | + return "/tmp/nfd.sock"; |
| 38 | } |
| 39 | |
| 40 | shared_ptr<UnixTransport> |
| 41 | @@ -135,4 +135,4 @@ UnixTransport::resume() |
| 42 | |
| 43 | } |
| 44 | |
| 45 | -#endif // _WIN32 |
| 46 | \ No newline at end of file |
| 47 | +#endif // _WIN32 |
| 48 | EOF |
| 49 | |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 50 | ./waf configure --prefix="${path}/build/deps" |
| 51 | ./waf build |
| 52 | ./waf install |
| 53 | popd |
| 54 | |
| 55 | #################################### |
| 56 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 57 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 58 | git clone ${GIT}/NFD build/NFD |
| 59 | pushd build/NFD |
| 60 | git checkout ${NFD_COMMIT} |
| 61 | git submodule update --init |
| 62 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 63 | ./waf configure --prefix="${path}/build/deps" |
| 64 | ./waf build |
| 65 | ./waf install |
| 66 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 67 | |
| 68 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 69 | ./waf configure |