aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/build.sh67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/build.sh b/src/build.sh
deleted file mode 100755
index 6e027b7..0000000
--- a/src/build.sh
+++ /dev/null
@@ -1,67 +0,0 @@
1#!/bin/bash
2
3# Poor mans git sub modules, coz otherwise it gets complex.
4if [ ! -d git-sub-modules/fcgi2 ]; then
5 pushd git-sub-modules
6 git clone https://github.com/FastCGI-Archives/fcgi2.git
7 popd
8 ln -fs git-sub-modules/fcgi2 fcgi2
9else
10 pushd git-sub-modules/fcgi2
11 git pull
12 popd
13fi
14
15pushd fcgi2 >/dev/null
16make distclean
17./autogen.sh
18./configure
19sed -e "s/#define PACKAGE/#define FCGI_PACKAGE/g" -i fcgi_config.h
20sed -e "s/#define VERSION /#define FCGI_VERSION /g" -i fcgi_config.h
21make
22popd >/dev/null
23
24
25if [ ! -d git-sub-modules/luajit-2.0 ]; then
26 pushd git-sub-modules
27 git clone https://luajit.org/git/luajit-2.0.git
28 popd
29 ln -fs git-sub-modules/luajit-2.0 luajit
30else
31 pushd git-sub-modules/luajit-2.0
32 git pull
33 popd
34fi
35pushd luajit >/dev/null
36make clean
37make amalg
38popd >/dev/null
39
40
41if [ ! -d git-sub-modules/qlibc ]; then
42 pushd git-sub-modules
43 git clone https://github.com/wolkykim/qlibc.git
44 popd
45 ln -fs git-sub-modules/qlibc qlibc
46else
47 pushd git-sub-modules/qlibc
48 git pull
49 popd
50fi
51pushd qlibc >/dev/null
52make clean
53./configure
54make
55popd >/dev/null
56
57
58export CFLAGS="-Iluajit/src -Ifcgi2 -Ifcgi2/include -Iqlibc/include/qlibc $(mysql_config --cflags)"
59export LDFLAGS="-Lluajit/src -Lfcgi2/libfcgi/.libs -Lqlibc/lib $(mysql_config --libs) -Wl,-E -l:libluajit.a -l:libfcgi.a -l:libqlibcext.a -l:libqlibc.a -lm -ldl"
60gcc $CFLAGS sledjchisl.c -o sledjchisl toybox.c $LDFLAGS || exit 1
61
62
63sudo killall -TERM sledjchisl.fcgi
64sleep 2
65sudo killall -KILL sledjchisl.fcgi
66sudo ln -fs $(pwd)/sledjchisl /var/www/fcgi-bin/sledjchisl.fcgi
67sudo ln -fs $(pwd)/.sledjChisl.conf.lua /var/www/fcgi-bin/