Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Alexander Afanasyev | 712dedc | 2017-02-09 16:31:41 -0800 | [diff] [blame] | 3 | # Avoid dependency on non-standard tools |
| 4 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin |
| 5 | export PKGCONFIG=/usr/local/bin/pkg-config |
| 6 | |
Qi Zhao | 6d0399e | 2017-02-23 16:24:39 -0800 | [diff] [blame] | 7 | NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-1709aa70999bd8cbe0e7c680aaab37f2d24323a5} |
| 8 | NFD_COMMIT=${NFD_COMMIT:-d396b61ba14a84b34d3ae65db4530062f7d43301} |
Alexander Afanasyev | ca6d5d9 | 2017-02-02 20:43:59 -0800 | [diff] [blame] | 9 | NDN_TOOLS_COMMIT=${NDN_TOOLS_COMMIT:-ndn-tools-0.4} |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 10 | |
| 11 | GIT=${GIT:-https://github.com/named-data} |
| 12 | |
| 13 | mkdir build 2>/dev/null || true |
| 14 | path="$(pwd)" |
| 15 | |
| 16 | ####################################### |
| 17 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 18 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 19 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 20 | pushd build/ndn-cxx |
| 21 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 22 | |
| 23 | patch -p1 <<EOF |
| 24 | diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 25 | index f2e44aa..268f967 100644 |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 26 | --- a/src/transport/unix-transport.cpp |
| 27 | +++ b/src/transport/unix-transport.cpp |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 28 | @@ -40,7 +40,7 @@ std::string |
| 29 | UnixTransport::getSocketNameFromUri(const std::string& uriString) |
| 30 | { |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 31 | // Assume the default nfd.sock location. |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 32 | - std::string path = "/var/run/nfd.sock"; |
| 33 | + std::string path = "/tmp/nfd.sock"; |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 34 | |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 35 | if (uriString.empty()) { |
| 36 | return path; |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 37 | EOF |
| 38 | |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 39 | ./waf configure --prefix="${path}/build/deps" \ |
| 40 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 41 | ./waf build |
| 42 | ./waf install |
| 43 | popd |
| 44 | |
| 45 | #################################### |
| 46 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 47 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 48 | git clone ${GIT}/NFD build/NFD |
| 49 | pushd build/NFD |
| 50 | git checkout ${NFD_COMMIT} |
| 51 | git submodule update --init |
| 52 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 53 | ./waf configure --prefix="${path}/build/deps" \ |
| 54 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 55 | ./waf build |
| 56 | ./waf install |
| 57 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 58 | |
Qi Zhao | 5fc9a70 | 2016-12-23 17:32:01 -0800 | [diff] [blame] | 59 | #################################### |
| 60 | |
| 61 | rm -Rf build/ndn-tools |
| 62 | git clone ${GIT}/ndn-tools build/ndn-tools |
| 63 | pushd build/ndn-tools |
| 64 | git checkout ${NDN_TOOLS_COMMIT} |
| 65 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 66 | ./waf configure --prefix="${path}/build/deps" \ |
| 67 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
| 68 | ./waf build |
| 69 | ./waf install |
| 70 | popd |
| 71 | |
| 72 | #################################### |
| 73 | |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 74 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 75 | ./waf configure |