-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_inner.sh
executable file
·37 lines (31 loc) · 992 Bytes
/
build_inner.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
#!/bin/sh -ex
# we are using two staging directories: One for the GS dependencies
# (performance and webserver), and one for the actual app. This
# is beneficial when building the container because we can often cache
# the dependency layer
WS_STAGEDIR=$PWD/stage_ws
STAGEDIR=$PWD/stage
mkdir -p $WS_STAGEDIR/usr/local/lib
mkdir -p $WS_STAGEDIR/usr/local/include
mkdir -p $WS_STAGEDIR/usr/local/bin
mkdir -p $STAGEDIR
export CPATH=$WS_STAGEDIR/usr/local/include:$CPATH
export LIBRARY_PATH=$WS_STAGEDIR/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$WS_STAGEDIR//usr/local/lib:$LD_LIBRARY_PATH
if [ ! -d performance ]; then
git clone https://github.com/gnustep/libs-performance performance
fi
cd performance
make
make install DESTDIR=$WS_STAGEDIR
cd ..
if [ ! -d webserver ]; then
git clone https://github.com/gnustep/libs-webserver webserver
fi
cd webserver
make
make install DESTDIR=$WS_STAGEDIR
cd ..
make
make install DESTDIR=$STAGEDIR
docker build "$@" -f Dockerfile .