rockspecs for my libraries and tools for Lua

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

rockspecs for my libraries and tools for Lua

Luiz Henrique de Figueiredo
I've recently updated my libraries and tools for Lua to make them
self-contained and build out of the box in Linux and macOS. See
http://lua-users.org/lists/lua-l/2018-07/msg00671.html and other
messages with the same subject.

The packages have a version number in preparation for making them
available at LuaRocks. See http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/

I need help making rockspecs for my packages that will work everywhere
because I don't have many platforms to test them on.

Attached is limath-100-1.rockspec, for the math library at
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#limath

Is this rockspec right? Can it be simplified? Does it need anything
else? Will this template work for all my packages? Will it work for
both LuaRocks 2 and 3? Does it need to?

Thank you for your help.
--lhf

limath-100-1.rockspec (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rockspecs for my libraries and tools for Lua

Oliver Schmidt-3
Hi,

On 28.09.18 14:52, Luiz Henrique de Figueiredo wrote:
> Attached is limath-100-1.rockspec, for the math library at
> http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#limath

attached is a simple rockspec that can build "limath" with luarocks's builtin
build type.

As demonstration I set up a github repository with travis and appveyor builds
that are showing that this rockspecs builds fine and the tests are running OK
for Linux, Mac OS, Windows MSVC & Windows MINGW using luarocks 2.4.4 and 3.0.2,
for Lua versions 5.1, 5.2, 5.3, luajit 2.0 & 2.1, see
https://github.com/osch/lua-limath-test

> Will it work for both LuaRocks 2 and 3? Does it need to?

IMHO it's better also to support LuaRocks 2 since it is still used in many Linux
distros, therefore I removed description.labels and rockspec_format = "3.0" to
remain backwards compatible.

Best regards,
Oliver

limath-100-1.rockspec (940 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rockspecs for my libraries and tools for Lua

Luiz Henrique de Figueiredo
> attached is a simple rockspec that can build "limath" with luarocks's builtin build type.

Thanks. My Makefiles already have a "build" target, hence the build
entry in the template I've posted. This was suggested by Hisham, but
I'm not sure I did it right.

>  I removed description.labels and rockspec_format = "3.0" to remain backwards compatible.

Removing description.labels and rockspec_format = "3.0" is all that is
needed to support LuaRocks 2?

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: rockspecs for my libraries and tools for Lua

Oliver Schmidt-3
On 28.09.18 19:00, Luiz Henrique de Figueiredo wrote:
>> attached is a simple rockspec that can build "limath" with luarocks's builtin
build type.
>
> Thanks. My Makefiles already have a "build" target, hence the build
> entry in the template I've posted. This was suggested by Hisham, but
> I'm not sure I did it right.

I have not much experience using luarocks's make build type, especially this
could be problematic under windows if there is no GNU Make installed. IMHO it's
much easier to have multi platform support using luarocks builtin build type
especially for simple C projects.

>
>>  I removed description.labels and rockspec_format = "3.0" to remain backwards
compatible.
>
> Removing description.labels and rockspec_format = "3.0" is all that is
> needed to support LuaRocks 2?

as you can see from the automatic build & tests: yes it builds with luarocks 2 &
3, see

    Linux & MacOS : https://travis-ci.org/osch/lua-limath-test
    Windows: https://ci.appveyor.com/project/osch/lua-limath-test