local git_ref = '2a8204b5ba6023137c8ecae5c7c851311e7b7347'
local modrev = 'scm'
local specrev = '1'

local repo_url = 'https://github.com/Freed-Wu/cppinsights.vim'

rockspec_format = '3.0'
package = 'cppinsights.vim'
version = modrev ..'-'.. specrev

description = {
  summary = 'Vim extension for C++ Insights.',
  detailed = '',
  labels = { 'cppinsights', 'vim' } ,
  homepage = 'https://luarocks.org/modules/Freed-Wu/cppinsights.vim',
  license = 'GPL-3.0'
}

dependencies = { 'lua >= 5.1' } 

test_dependencies = { }

source = {
  url = repo_url .. '/archive/' .. git_ref .. '.zip',
  dir = 'cppinsights.vim-' .. '2a8204b5ba6023137c8ecae5c7c851311e7b7347',
}

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

build = {
  type = 'builtin',
  copy_directories = { 'autoload', 'doc', 'ftplugin' } ,
}
