blob: 6a353e727a9f78e5fb75f9133cd14ae3ae591d93 [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
Alexander Afanasyev964feb92016-03-22 13:03:11 -070029index 6b86a34..e72170e 100644
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070030--- a/src/transport/unix-transport.cpp
31+++ b/src/transport/unix-transport.cpp
Alexander Afanasyev964feb92016-03-22 13:03:11 -070032@@ -72,7 +72,7 @@ UnixTransport::getDefaultSocketName(const ConfigFile& config)
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070033 }
Alexander Afanasyev964feb92016-03-22 13:03:11 -070034
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070035 // Assume the default nfd.sock location.
36- return "/var/run/nfd.sock";
37+ return "/tmp/nfd.sock";
38 }
Alexander Afanasyev964feb92016-03-22 13:03:11 -070039
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070040 shared_ptr<UnixTransport>
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070041EOF
42
Alexander Afanasyev964feb92016-03-22 13:03:11 -070043./waf configure --prefix="${path}/build/deps" \
44 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070045./waf build
46./waf install
47popd
48
49####################################
50
Alexander Afanasyev11ae34d2016-03-21 11:55:16 -070051rm -Rf build/NFD
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070052git clone ${GIT}/NFD build/NFD
53pushd build/NFD
54git checkout ${NFD_COMMIT}
55git submodule update --init
56PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
Alexander Afanasyev964feb92016-03-22 13:03:11 -070057 ./waf configure --prefix="${path}/build/deps" \
58 --sysconfdir="/Applications/NDN.app/Contents/etc"
Alexander Afanasyevb2cf5c02016-03-21 11:04:28 -070059./waf build
60./waf install
61popd
Alexander Afanasyev8e986f82016-03-21 14:19:15 -070062
63PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \
64 ./waf configure