# Maintainer: PktSurf app=lua version=5.1.5 build=1sml homepage="https://www.lua.org/home.html" download="https://www.lua.org/ftp/lua-$version.tar.gz" desc="a powerful, fast, light-weight, embeddable scripting language" requires="readline" prepbuilddir() { mkandenterbuilddir rm -rf $app-$version tar xf $srcdir/$app-$version.tar.?z* cd $app-$version fixbuilddirpermissions } build() { sed -i "s@#define LUA_ROOT\t"'"/usr/local/"@#define LUA_ROOT "/usr"@' src/luaconf.h sed -i 's@INSTALL_TOP= /usr/local@INSTALL_TOP='"$pkg/usr"'@' Makefile sed -i 's@INSTALL_LMOD=@#INSTALL_LMOD=@' Makefile sed -i 's@INSTALL_CMOD=@#INSTALL_LMOD=@' Makefile make linux CFLAGS="$CFLAGS" make linux install \ CFLAGS="$CFLAGS" \ INSTALL_BIN="$pkg/usr/bin" \ INSTALL_MAN="$pkg/usr/share/man/man1" # Build the shared library mkdir -p shared && cd shared ar -x $pkg/usr/lib/liblua.a gcc -lreadline -lhistory -lncurses -lm -ldl -shared *.o -o liblua.so.$version cp -a liblua.so.$version $pkg/usr/lib/ ( cd $pkg/usr/lib ln -s liblua.so.$version liblua.so.5.1 ln -s liblua.so.$version liblua.so.5 ln -s liblua.so.$version liblua.so ) cd .. install -Dm 644 $srcdir/lua.pc $pkg/usr/share/pkgconfig/lua.pc cp COPYRIGHT $pkgdocs/ mkfinalpkg } sha512sums=" 55973895c2dfd6e3b051ae1baec6c70760f7a63db464aa4801ece6ca465039beda7de1be7c0d40a3c0bf6de3f06cb3d9952822dcee32d9a03c60a44ab85a4a9d lua-5.1.5.tar.lz "