> -----Original Message-----
> >
> >> -----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
> >

So I remove the '-1' from the tarball filename, and then can drop the extra 
'dir = ' line. Clear!


One more question though; installed it using LuaRocks, automatically downloads 
dependencies. Works as expected (nice!).
But when inspecting the repository tree, I noted that 'copas' has a 'doc' 
directory, whereas 'copastimer' doesn't have it. Though neither has it 
mentioned in the rockspec, and both have it in the tarball, why is that? How to 
go about to get the docs and test/example files installed as well when someone 
installs copastimer?

Thx for your patience!



------------------------------------------------------------------------------
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

Reply via email to