-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgigi.bash
58 lines (49 loc) · 1.27 KB
/
gigi.bash
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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Build the gdal cgi image subseter
export ME=${ME:-lucianpls}
export THIS_PROJECT=AHTSE
export GITHUB=${GITHUB:-https://github.com}
export PREFIX=${PREFIX:-$HOME}
refresh() {
project=$(basename $1)
if [[ ! -d $project ]]
then
git clone -q $1
else
(cd $project; git pull -q)
fi
if [[ ! -z "$2" ]]
then
(cd $project; git checkout -q $2)
fi
}
make_build() {
pushd $1
[[ -e ./configure ]] || [[ -e ./autogen.sh ]] && ./autogen.sh
[[ -e ./configure ]] && ./configure --prefix=$PREFIX
make -j $NP
$SUDO make install
make clean
popd
}
NP=${NP:-$(nproc)}
pushd $HOME/src
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
sudo yum install -q -y mod_fcgid lua-devel
# CGICC
VER=3.2.19
wget -qO - http://ftp.gnu.org/gnu/cgicc/cgicc-$VER.tar.gz |tar -zxf -
make_build cgicc-$VER
# fcgi SDK, known release
# VER=2.4.2
# wget -qO - http://github.com/FastCGI-Archives/fcgi2/archive/refs/tags/$VER.tar.gz |tar -zxf -
# make_build fcgi2-$VER
# fcgi SDK, latest
mkdir -p fcgi2
wget -S https://github.com/FastCGI-Archives/fcgi2/tarball/master -O - |tar -xzC fcgi2 --strip-components 1
make_build fcgi2
# Ready for gigi itself
refresh $GITHUB/$ME/gigi
# See gigi source for what make install does
make_build gigi
# From $HOME/src
popd