-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcompile_lua.sh
More file actions
40 lines (30 loc) · 755 Bytes
/
compile_lua.sh
File metadata and controls
40 lines (30 loc) · 755 Bytes
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
#!/bin/sh -ex
. utilslib.sh
basedir=/src/lua
baseurl=http://www.lua.org/ftp
version=5.1.4
tarball=lua-${version}.tar.gz
directory=lua-${version}
mkdir -p $basedir
pushd $basedir
utilslib_download $baseurl $tarball
if [ ! -d $directory ]
then
echo unpacking $tarball ...
tar -xvf $tarball
fi
pushd $directory
if [ ! -f mingw.patch.applied ]
then
echo patching ...
patch -p1 < ../../lua-${version}-mingw.patch
echo applied > mingw.patch.applied
fi
make
install -p -m 0755 src/lua src/luac src/lua51.dll /bin
install -p -m 0644 src/lua51.dll /bin
install -p -m 0644 src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h /include
install -p -m 0644 src/liblua.a /lib
install -p -m 0644 etc/lua.pc /lib/pkgconfig/lua5.1.pc
popd
popd