blob: 9378aca6a17d7fcb87b954511e585cfa8dda5939 [file] [log] [blame]
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -07001#!/usr/bin/env bash
2
Alexander Afanasyevca6d5d92017-02-02 20:43:59 -08003NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-ndn-cxx-0.5.1}
4NFD_COMMIT=${NFD_COMMIT:-NFD-0.5.1}
5NDN_TOOLS_COMMIT=${NDN_TOOLS_COMMIT:-ndn-tools-0.4}
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -07006
7GIT=${GIT:-https://github.com/named-data}
8
9mkdir build 2>/dev/null || true
10path="$(pwd)"
11
12#######################################
13
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070014rm -Rf build/ndn-cxx
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070015git clone ${GIT}/ndn-cxx build/ndn-cxx
16pushd build/ndn-cxx
17git checkout ${NDN_CXX_COMMIT}
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070018
19patch -p1 <<EOF
20diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
Qi Zhao0e043e52016-12-05 18:27:09 -080021index f2e44aa..268f967 100644
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070022--- a/src/transport/unix-transport.cpp
23+++ b/src/transport/unix-transport.cpp
Qi Zhao0e043e52016-12-05 18:27:09 -080024@@ -40,7 +40,7 @@ std::string
25 UnixTransport::getSocketNameFromUri(const std::string& uriString)
26 {
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070027 // Assume the default nfd.sock location.
Qi Zhao0e043e52016-12-05 18:27:09 -080028- std::string path = "/var/run/nfd.sock";
29+ std::string path = "/tmp/nfd.sock";
Alexander Afanasyev964feb92016-03-22 13:03:11 -070030
Qi Zhao0e043e52016-12-05 18:27:09 -080031 if (uriString.empty()) {
32 return path;
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070033EOF
34
Alexander Afanasyev964feb92016-03-22 13:03:11 -070035./waf configure --prefix="${path}/build/deps" \
36 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070037./waf build
38./waf install
39popd
40
41####################################
42
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070043rm -Rf build/NFD
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070044git clone ${GIT}/NFD build/NFD
45pushd build/NFD
46git checkout ${NFD_COMMIT}
47git submodule update --init
48PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
Alexander Afanasyev964feb92016-03-22 13:03:11 -070049 ./waf configure --prefix="${path}/build/deps" \
50 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070051./waf build
52./waf install
53popd
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070054
Qi Zhao5fc9a702016-12-23 17:32:01 -080055####################################
56
57rm -Rf build/ndn-tools
58git clone ${GIT}/ndn-tools build/ndn-tools
59pushd build/ndn-tools
60git checkout ${NDN_TOOLS_COMMIT}
61PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
62 ./waf configure --prefix="${path}/build/deps" \
63 --sysconfdir="/Applications/NDN.app/Contents/etc"
64./waf build
65./waf install
66popd
67
68####################################
69
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070070PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
71 ./waf configure