blob: b54cd9d7a806d87cb2709fa08944a2394b869d09 [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
11#######################################
12
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070013rm -Rf build/ndn-cxx
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070014git clone ${GIT}/ndn-cxx build/ndn-cxx
15pushd build/ndn-cxx
16git checkout ${NDN_CXX_COMMIT}
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070017
18patch -p1 <<EOF
19diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
20index 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
39EOF
40
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070041./waf configure --prefix="${path}/build/deps"
42./waf build
43./waf install
44popd
45
46####################################
47
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070048rm -Rf build/NFD
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070049git clone ${GIT}/NFD build/NFD
50pushd build/NFD
51git checkout ${NFD_COMMIT}
52git submodule update --init
53PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
54 ./waf configure --prefix="${path}/build/deps"
55./waf build
56./waf install
57popd
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070058
59PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
60 ./waf configure