Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.5 KiB

name=lua
majver=5.3
version=$majver.4
dlextract "http://www.lua.org/ftp/$name-$version.tar.gz" \
'53a9c68bcc0eda58bdc2095ad5cdfc63'
_
cd "$name-$version"
# Fix paths
sed -i -e "/LUA_ROOT/s/usr\/local/$(safe_sed "$dir_prefix")/" \
-e "/LUA_LDIR/s/share/$(safe_sed "$dir_data")/" \
-e "/LUA_CDIR/s/lib/$(safe_sed "$dir_lib")/" src/luaconf.h
make linux \
MYLIBS="-lncurses" \
MYCFLAGS="$CFLAGS -fPIC" \
MYLDFLAGS="$LDFLAGS"
make install \
INSTALL_TOP="$PWD/install" \
INSTALL_BIN="\$(INSTALL_TOP)/$dir_bin" \
INSTALL_LIB="\$(INSTALL_TOP)/$dir_lib" \
INSTALL_INC="\$(INSTALL_TOP)/$dir_include" \
INSTALL_MAN="\$(INSTALL_TOP)/$dir_man/man1" \
INSTALL_LMOD="\$(INSTALL_TOP)/$dir_data/$name/$majver" \
INSTALL_CMOD="\$(INSTALL_TOP)/$dir_lib/$name/$majver"
# Check the build log to find this
libs='-lm -Wl,-E -ldl -lreadline -lncurses'
# Build the shared library
( cd "install/$dir_lib"
ar x liblua.a
rm liblua.a
cc -shared "-Wl,-soname,liblua.so.$majver" *.o $libs -o "liblua.so.$version"
rm *.o
ln -s "liblua.so.$version" "liblua.so.$majver"
ln -s "liblua.so.$version" liblua.so
)
# Link the binary against the shared library
rm "install/$dir_bin/lua"
cc src/lua.o "install/$dir_lib/liblua.so" $libs -o "install/$dir_bin/lua"
rm "install/$dir_bin/luac"
cc src/luac.o src/lopcodes.o src/ldump.o "install/$dir_lib/liblua.so" $libs -o "install/$dir_bin/luac"
# Actually install
mkdir -p "$dir_install"
cp -Ta install "$dir_install/$dir_prefix"
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: