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} |
Qi Zhao | 5fc9a70 | 2016-12-23 17:32:01 -0800 | [diff] [blame] | 5 | NDN_TOOLS_COMMIT=${NDN_TOOLS_COMMIT:-master} |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 6 | |
| 7 | GIT=${GIT:-https://github.com/named-data} |
| 8 | |
| 9 | mkdir build 2>/dev/null || true |
| 10 | path="$(pwd)" |
| 11 | |
Alexander Afanasyev | e1236c7 | 2016-03-21 15:52:09 -0700 | [diff] [blame] | 12 | pushd build |
Qi Zhao | 86f2b21 | 2016-12-06 12:44:16 -0800 | [diff] [blame^] | 13 | # wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2 |
| 14 | wget https://github.com/sparkle-project/Sparkle/releases/download/1.16.0/Sparkle-1.16.0.tar.bz2 |
| 15 | mkdir Sparkle-1.16 || true |
| 16 | pushd Sparkle-1.16 |
| 17 | tar xf ../Sparkle-1.16.0.tar.bz2 |
Alexander Afanasyev | e1236c7 | 2016-03-21 15:52:09 -0700 | [diff] [blame] | 18 | popd |
Qi Zhao | 86f2b21 | 2016-12-06 12:44:16 -0800 | [diff] [blame^] | 19 | mv Sparkle-1.16/Sparkle.framework . |
Alexander Afanasyev | e1236c7 | 2016-03-21 15:52:09 -0700 | [diff] [blame] | 20 | popd |
| 21 | |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 22 | ####################################### |
| 23 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 24 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 25 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 26 | pushd build/ndn-cxx |
| 27 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 28 | |
| 29 | patch -p1 <<EOF |
| 30 | 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] | 31 | index f2e44aa..268f967 100644 |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 32 | --- a/src/transport/unix-transport.cpp |
| 33 | +++ b/src/transport/unix-transport.cpp |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 34 | @@ -40,7 +40,7 @@ std::string |
| 35 | UnixTransport::getSocketNameFromUri(const std::string& uriString) |
| 36 | { |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 37 | // Assume the default nfd.sock location. |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 38 | - std::string path = "/var/run/nfd.sock"; |
| 39 | + std::string path = "/tmp/nfd.sock"; |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 40 | |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 41 | if (uriString.empty()) { |
| 42 | return path; |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 43 | EOF |
| 44 | |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 45 | ./waf configure --prefix="${path}/build/deps" \ |
| 46 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 47 | ./waf build |
| 48 | ./waf install |
| 49 | popd |
| 50 | |
| 51 | #################################### |
| 52 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 53 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 54 | git clone ${GIT}/NFD build/NFD |
| 55 | pushd build/NFD |
| 56 | git checkout ${NFD_COMMIT} |
| 57 | git submodule update --init |
| 58 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 59 | ./waf configure --prefix="${path}/build/deps" \ |
| 60 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 61 | ./waf build |
| 62 | ./waf install |
| 63 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 64 | |
Qi Zhao | 5fc9a70 | 2016-12-23 17:32:01 -0800 | [diff] [blame] | 65 | #################################### |
| 66 | |
| 67 | rm -Rf build/ndn-tools |
| 68 | git clone ${GIT}/ndn-tools build/ndn-tools |
| 69 | pushd build/ndn-tools |
| 70 | git checkout ${NDN_TOOLS_COMMIT} |
| 71 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 72 | ./waf configure --prefix="${path}/build/deps" \ |
| 73 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
| 74 | ./waf build |
| 75 | ./waf install |
| 76 | popd |
| 77 | |
| 78 | #################################### |
| 79 | |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 80 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 81 | ./waf configure |