maint: self-configure rockspec for release versions.
* luaposix-git-1.rockspec (source, dependencies): Set fields based
on _MODREV value.
@@ -13,18 +13,26 @@ description = {
license = 'MIT/X11',
}
-source = {
- url = 'git://github.com/luaposix/luaposix.git',
--- url = 'http://github.com/luaposix/luaposix/archive/v' .. _MODREV .. '.zip',
--- dir = 'luaposix-' .. _MODREV,
-}
-
dependencies = {
'lua >= 5.1, < 5.4',
'bit32',
- 'ldoc',
}
+source = (function(gitp)
+ if gitp then
+ dependencies[#dependencies + 1] = 'ldoc'
+
+ return {
+ url = 'git://github.com/luaposix/luaposix.git',
+ }
+ else
+ return {
+ url = 'http://github.com/luaposix/luaposix/archive/v' .. _MODREV .. '.zip',
+ dir = 'luaposix-' .. _MODREV,
+ }
+ end
+end)(_MODREV == 'git')
+
build = {
type = 'command',
build_command = '$(LUA) build-aux/luke'
