-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-steno.sh
executable file
·45 lines (35 loc) · 1.25 KB
/
build-steno.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
BASE_DIR=/source
BUILD_DIR=$BASE_DIR/build
FINAL_DIR=$BASE_DIR/final
export GOPATH=${BUILD_DIR}/go
GO_SRC=$GOPATH/src
VENDORS=$BASE_DIR/vendors
STENO_USER_DIR=$GO_SRC/github.com/nizq
STENO_SRC_DIR=$STENO_USER_DIR/stenographer
STENOTYPE_SRC_DIR=$STENO_SRC_DIR/stenotype
rm -rf $BUILD_DIR/*
mkdir -p $GO_SRC/golang.org/x
cp -r -f -v $VENDORS/net $GO_SRC/golang.org/x
mkdir -p $STENO_USER_DIR
cp -r -f -v $VENDORS/stenographer $STENO_SRC_DIR
echo "===> Build testimony..."
cp -r -f -v $VENDORS/testimony $BUILD_DIR
cd $BUILD_DIR/testimony/c
make
cp -f -v libtestimony.a /usr/lib
cp -f -v libtestimony.so /usr/lib
cp -f -v testimony.h /usr/include
cp -f -v libtestimony.so $FINAL_DIR/
echo "===> Install stenographer..."
go get github.com/nizq/stenographer
echo "===> Build stenotype manually..."
cd $STENOTYPE_SRC_DIR
sed -i "s/^SHARED_CFLAGS=-std=c++0x -g -Wall -fno-strict-aliasing/SHARED_CFLAGS=-std=c++0x -g -Wall -fno-strict-aliasing -D_GLIBCXX_USE_CXX11_ABI=0/g" Makefile
sed -i "s/-ltestimony$/-ltestimony -lexecinfo -largp/g" Makefile
make
echo "===> Collect files ..."
cp -f -v $GOPATH/bin/stenographer $FINAL_DIR/
cp -f -v $STENO_SRC_DIR/stenocurl $FINAL_DIR/
cp -f -v $STENO_SRC_DIR/stenoread $FINAL_DIR/
cp -f -v $STENOTYPE_SRC_DIR/stenotype $FINAL_DIR/