On Mon, Oct 24, 2011 at 4:17 AM, Thijs Schreijer
<[email protected]> wrote:
>
>> -----Original Message-----
>> From: Hisham [mailto:[email protected]]
>> Sent: maandag 24 oktober 2011 3:38
>> To: [email protected]
>> Subject: Re: [Luarocks-developers] [ANN] rockspec for CopasTimer
>>
>> On Sun, Oct 23, 2011 at 8:37 PM, Thijs Schreijer
>> <[email protected]> wrote:
>> > Hi,
>> >
>> > My First effort for a rock is attached, please verify correctness
>> before
>> > posting as I’m in doubt whether it is correct and have no clue how
>> to test
>> > it.
>>
>> You can test it by running "luarocks build
>> CopasTimer-0.4.0-1.rockspec". The first tweak needed was to rename it,
>
> Fixed that
>
>> as rockspec filenames are expected to be all-lowercase. Then I noticed
>> that the .tar.gz is named "copastimer-0.4.0-1.tar.gz", but the
>> directory inside it is named "copastimer-0.4.1".
>
> I copied that from the tutorial; http://luarocks.org/en/Creating_a_rock
> did I miss something there, or does it have the same flaw?
I think you missed it :) From the link:
package = "LuaFruits"
version = "1.0-1"
source = {
url = "http://github.com/downloads/me/luafruits/luafruits-1.0.tar.gz"
}
Note that the rockspec full version is "1.0-1", but the source tarball
is "luafruits-1.0".
> Not needing the extra entry 'source.dir' would require that the
> directory inside the tar also uses the '-1' spec revision? Is that
> how it works?
The other way around. Neither the directory or the tarball should have
"-1": that suffix refers to the rockspec revision, and not upstream.
The idea is that the revision is incremented if changes to the
rockspec are needed, without any changes to the tarball.
>> This required an
>> additional entry, source.dir. (The "-1" suffix in rockspec versions is
>> reserved to the rockspec revision, separate from the package version.
>> I advise you to avoid using this suffix in package tarballs.) After
>
> You got me confused by now; whats the advised way of working? Not including
> The revision in the directory in the tar, and then include the extra
> 'source.dir' key?
No. Using a "shell" terminology: LuaRocks does not assume that the
tarball contains a directory named neither $package-$version or
$package-$revision. It assumes that the directory is named `basename
$tarball .tar.gz`.
Hope that clears things up :)
-- Hisham
http://hisham.hm/ - http://colorbleed.com.br/
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers