Skip to content

Commit

Permalink
fix(luarocks): add rockspec template
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Apr 4, 2024
1 parent 4be0e35 commit 6520835
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ jobs:
detailed_description: |
`toml-edit` is a library to parse and edit `.toml` files as if they were lua tables, all while preserving formatting and comments.
Based on rust's `toml-edit`.
template: .github/workflows/rockspec.template
41 changes: 41 additions & 0 deletions .github/workflows/rockspec.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local git_ref = '$git_ref'
local modrev = '$modrev'
local specrev = '$specrev'

local repo_url = '$repo_url'

rockspec_format = '3.0'
package = '$package'
version = modrev ..'-'.. specrev

description = {
summary = '$summary',
detailed = $detailed_description,
labels = $labels,
homepage = '$homepage',
$license
}

dependencies = $dependencies

test_dependencies = $test_dependencies

source = {
url = repo_url .. '/archive/' .. git_ref .. '.zip',
dir = '$repo_name-' .. '$archive_dir_suffix',
}

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

build = {
type = 'make',
install_variables = {
INST_PREFIX='$(PREFIX)',
INST_LIBDIR='$(LIBDIR)',
},
copy_directories = $copy_directories,
}

0 comments on commit 6520835

Please sign in to comment.