{ "name": "lua-5.3", "buildsystem": "simple", "build-commands": [ "make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux", "make TO_LIB=liblua.so.5.3.5 INSTALL_TOP=$FLATPAK_DEST install", "ln -sf liblua.so.5.3.5 $FLATPAK_DEST/lib/liblua.so", "ln -sf liblua.so.5.3.5 $FLATPAK_DEST/lib/liblua.so.5.3", "make INSTALL_TOP=${FLATPAK_DEST} pc > lua.pc", "cat lua.pc.in >> lua.pc", "install -Dm644 lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc", "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua53.pc", "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.3.pc", "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.3.pc" ], "sources": [ { "type": "archive", "url": "https://www.lua.org/ftp/lua-5.3.5.tar.gz", "sha256": "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac" }, { "type": "patch", "path": "makefile-add-liblua.so-rule.patch" }, { "type": "file", "path": "lua.pc.in" }, { "type": "shell", "commands": [ "sed -i \"s|/usr/local/|$FLATPAK_DEST/|;s|LUA_IDSIZE 60|LUA_IDSIZE 512|\" src/luaconf.h", "# Lua 5.3.5 has wrong release version in its Makefile. Fix it.", "sed 's/^R= \$V.4/R= \$V.5/' -i Makefile", "sed -i '12 a\\\\n#define LUA_COMPAT_5_1\\n#define LUA_COMPAT_5_2' src/luaconf.h" ] } ], "cleanup": [ "/bin", "/include", "/lib/pkgconfig", "/share/man" ] }