blob: d47e7a002f528d8d31bf4be56efe667e10792fc1 [file] [log] [blame]
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -07001#!/usr/bin/env bash
2
3NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-master}
4NFD_COMMIT=${NFD_COMMIT:-master}
5
6GIT=${GIT:-https://github.com/named-data}
7
8mkdir build 2>/dev/null || true
9path="$(pwd)"
10
Alexander Afanasyeve1236c72016-03-21 15:52:09 -070011pushd build
12wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2
13mkdir Sparkle-1.14 || true
14pushd Sparkle-1.14
15tar xf ../Sparkle-1.14.0.tar.bz2
16popd
17mv Sparkle-1.14/Sparkle.framework .
18popd
19
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070020#######################################
21
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070022rm -Rf build/ndn-cxx
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070023git clone ${GIT}/ndn-cxx build/ndn-cxx
24pushd build/ndn-cxx
25git checkout ${NDN_CXX_COMMIT}
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070026
27patch -p1 <<EOF
28diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
29index 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
48EOF
49
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070050./waf configure --prefix="${path}/build/deps"
51./waf build
52./waf install
53popd
54
55####################################
56
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070057rm -Rf build/NFD
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070058git clone ${GIT}/NFD build/NFD
59pushd build/NFD
60git checkout ${NFD_COMMIT}
61git submodule update --init
62PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
63 ./waf configure --prefix="${path}/build/deps"
64./waf build
65./waf install
66popd
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070067
68PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
69 ./waf configure