blob: 6a773abda01f1ae7800dc67ce14e466780239372 [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}
Qi Zhao5fc9a702016-12-23 17:32:01 -08005NDN_TOOLS_COMMIT=${NDN_TOOLS_COMMIT:-master}
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
Alexander Afanasyeve1236c72016-03-21 15:52:09 -070012pushd build
Qi Zhao86f2b212016-12-06 12:44:16 -080013# wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2
14wget https://github.com/sparkle-project/Sparkle/releases/download/1.16.0/Sparkle-1.16.0.tar.bz2
15mkdir Sparkle-1.16 || true
16pushd Sparkle-1.16
17tar xf ../Sparkle-1.16.0.tar.bz2
Alexander Afanasyeve1236c72016-03-21 15:52:09 -070018popd
Qi Zhao86f2b212016-12-06 12:44:16 -080019mv Sparkle-1.16/Sparkle.framework .
Alexander Afanasyeve1236c72016-03-21 15:52:09 -070020popd
21
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070022#######################################
23
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070024rm -Rf build/ndn-cxx
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070025git clone ${GIT}/ndn-cxx build/ndn-cxx
26pushd build/ndn-cxx
27git checkout ${NDN_CXX_COMMIT}
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070028
29patch -p1 <<EOF
30diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
Qi Zhao0e043e52016-12-05 18:27:09 -080031index f2e44aa..268f967 100644
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070032--- a/src/transport/unix-transport.cpp
33+++ b/src/transport/unix-transport.cpp
Qi Zhao0e043e52016-12-05 18:27:09 -080034@@ -40,7 +40,7 @@ std::string
35 UnixTransport::getSocketNameFromUri(const std::string& uriString)
36 {
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070037 // Assume the default nfd.sock location.
Qi Zhao0e043e52016-12-05 18:27:09 -080038- std::string path = "/var/run/nfd.sock";
39+ std::string path = "/tmp/nfd.sock";
Alexander Afanasyev964feb92016-03-22 13:03:11 -070040
Qi Zhao0e043e52016-12-05 18:27:09 -080041 if (uriString.empty()) {
42 return path;
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070043EOF
44
Alexander Afanasyev964feb92016-03-22 13:03:11 -070045./waf configure --prefix="${path}/build/deps" \
46 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070047./waf build
48./waf install
49popd
50
51####################################
52
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070053rm -Rf build/NFD
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070054git clone ${GIT}/NFD build/NFD
55pushd build/NFD
56git checkout ${NFD_COMMIT}
57git submodule update --init
58PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
Alexander Afanasyev964feb92016-03-22 13:03:11 -070059 ./waf configure --prefix="${path}/build/deps" \
60 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070061./waf build
62./waf install
63popd
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070064
Qi Zhao5fc9a702016-12-23 17:32:01 -080065####################################
66
67rm -Rf build/ndn-tools
68git clone ${GIT}/ndn-tools build/ndn-tools
69pushd build/ndn-tools
70git checkout ${NDN_TOOLS_COMMIT}
71PKG_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
76popd
77
78####################################
79
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070080PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
81 ./waf configure