Files
haikuports/dev-lua/luafilesystem/luafilesystem-1.8.0.recipe
2024-06-12 07:49:29 +02:00

53 lines
1.4 KiB
Bash

SUMMARY="A Lua library for file system operations"
DESCRIPTION="LuaFileSystem is a Lua library developed to complement the set \
of functions related to file systems offered by the standard Lua \
distribution. LuaFileSystem offers a portable way to access the underlying \
directory structure and file attributes."
HOMEPAGE="http://keplerproject.github.io/luafilesystem/"
COPYRIGHT="2003-2017 Kepler Project"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/keplerproject/luafilesystem/archive/v${portVersion//\./_}.tar.gz"
CHECKSUM_SHA256="16d17c788b8093f2047325343f5e9b74cccb1ea96001e45914a58bbae8932495"
SOURCE_DIR="luafilesystem-${portVersion//\./_}"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
luafilesystem$secondaryArchSuffix = $portVersion
lib:lfs$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:liblua$secondaryArchSuffix >= 5.4
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:lua5.4$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
LUAVERSION_WITHOUT_DOT=$(lua -v | sed 's/Lua //' | head -c3 | tr -d '.')
make LUA_INC="-I$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/lua$LUAVERSION_WITHOUT_DOT"
}
INSTALL()
{
LUAVERSION=$(lua -v | sed 's/Lua //' | head -c3)
make LUA_LIBDIR="$libDir/lua/$LUAVERSION" install
}
TEST()
{
make test
}