local git_ref = '37ad28a271f1892da62b1831cb3645b130f4f3c0'
local modrev = 'scm'
local specrev = '1'

local repo_url = 'https://github.com/Freed-Wu/lua-git2-temp'

rockspec_format = '3.0'
package = 'lua-git2-temp'
version = modrev ..'-'.. specrev

description = {
  summary = 'Lua bindings for libgit2',
  detailed = '',
  labels = { },
  homepage = 'http://libgit2.github.com',
  license = 'MIT'
}

dependencies = { 'lua >= 5.1' } 

test_dependencies = { }

source = {
  url = repo_url .. '/archive/' .. git_ref .. '.zip',
  dir = 'lua-git2-temp-' .. '37ad28a271f1892da62b1831cb3645b130f4f3c0',
}

if modrev == 'scm' or modrev == 'dev' then
  source = {
    url = repo_url:gsub('https', 'git')
  }
end

external_dependencies = {
	GIT2 = {
		header = "git2.h",
		library = "git2",
	}
}
build	= {
	type = "builtin",
	modules = {
		git2 = {
			sources = { "src/pre_generated-git2.nobj.c" },
			libraries = { "git2" },
			incdirs = { "$(GIT2_INCDIR)" },
			libdirs = { "$(GIT2_LIBDIR)" },
		}
	}
}
