-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.lua
77 lines (69 loc) · 2.22 KB
/
build.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
-- Build script for expkv-def
module = "expkv-def"
pkgversion = "0.9"
pkgdate = "2022-01-29"
-- update package date and version
tagfiles = {"expkv-def.dtx", "README.md", "CTAN.md"}
function update_tag(file, content, tagname, tagdate)
if tagname == nil then
tagname = pkgversion
tagdate = pkgdate
end
if string.match(file, "%.md") then
return string.gsub(content,
"%d%d%d%d%-%d%d%-%d%d v%d%.%d%w?",
tagdate .. " v" .. tagname)
elseif file == "expkv-def.dtx" then
content = string.gsub(content,
"date=%d%d%d%d%-%d%d%-%d%d",
"date=" .. tagdate)
content = string.gsub(content,
"version=%d.%d%w?",
"version=" .. tagname)
content = string.gsub(content,
"\\def\\ekvdDate{%d%d%d%d%-%d%d%-%d%d}",
"\\def\\ekvdDate{" .. tagdate .. "}")
return string.gsub(content,
"\\def\\ekvdVersion{%d%.%d%w?}",
"\\def\\ekvdVersion{" .. tagname .. "}")
end
return content
end
-- test with pdfTeX and the LaTeX format
checkengines = {"pdftex","luatex"}
checkformat = "latex"
-- from which files to build
sourcefiles = {"expkv-def.dtx"}
unpackfiles = sourcefiles
-- which files to put in the tds
installfiles = {"expkv-def.sty", "expkv-def.tex", "t-expkv-def.tex"}
textfiles = {"README.md", "CTAN.md"}
docfiles = {"expkv-def.pdf"}
-- how the documentation is build
typesetfiles = {"expkv-def.dtx"}
typesetruns = 4
-- make sure that expkv-def.tex ends up in the generic path
packtdszip = true
tdslocations = {
"tex/generic/expkv-def/expkv-def.tex",
"tex/context/third/expkv-def/t-expkv-def.tex",
}
-- CTAN upload
ctanreadme = "CTAN.md"
uploadconfig = {
pkg = module,
author = "Jonathan P. Spratte",
version = pkgversion .. " " .. pkgdate,
license = "lppl1.3c",
summary = "A key-defining frontend for expkv",
topic = "keyval",
ctanPath = "/macros/generic/expkv-def",
repository = "https://github.com/Skillmon/tex_expkv-def",
bugtracker = "https://github.com/Skillmon/tex_expkv-def/issues",
update = true,
description = [[
`expkv-def` is a frontend to define keys for the `expkv` key=val implementation.
It provides the defining frontend
* `\ekvdefinekeys{<set>}{<prefix> <key>=<definition>, ...}`
]]
}