3 # netsniff-ng - the packet sniffing beast
4 # By Emmanuel Roullit <emmanuel@netsniff-ng.org>
5 # Copyright 2009, 2011 Emmanuel Roullit.
6 # Subject to the GPL, version 2.
10 nacl_version
="nacl-20110221"
12 nacl_base_url
="http://hyperelliptic.org/nacl"
13 nacl_path
="$nacl_dir/$nacl_version.$nacl_suffix"
16 if test -z "$nacl_build_dir"; then
17 echo "Please input the path where NaCl should be build"
21 if ! test -d "$nacl_build_dir"; then
22 mkdir
"$nacl_build_dir"
25 wget
-O "$nacl_path" "$nacl_base_url/$nacl_version.$nacl_suffix"
26 tar xjf
"$nacl_path" -C "$nacl_build_dir"
28 $cc -Wall -O2 .
/abiname.c
-o .
/abiname
30 shorthostname
=$
(hostname |
sed 's/\..*//' |
tr -cd '[a-z][A-Z][0-9]')
32 echo "Building NaCl for arch $arch on host $shorthostname (grab a coffee, this takes a while) ..."
34 cd "$nacl_build_dir"/"$nacl_version"
38 nacl_lib_path
="$nacl_build_dir/$nacl_version/build/$shorthostname/lib/$arch"
39 nacl_include_path
="$nacl_build_dir/$nacl_version/build/$shorthostname/include/$arch"
41 echo "NaCl lib path $nacl_lib_path"
42 echo "NaCl include path $nacl_include_path"
44 .
/nacl_path.sh
"$nacl_include_path" "$nacl_lib_path"