forked from tdtrask/lua-subprocess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_spec.py
46 lines (44 loc) · 1.13 KB
/
generate_spec.py
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
#!/usr/bin/python3
from lua2pack import main
import os
rockspec = r'''
package = "subprocess"
version = "'''+os.environ.get('LUA_SUBPROCESS_VERSION','0.5.5-1')+'''"
source = {
url = "git://github.com/huakim/lua-subprocess.git"
}
description = {
summary = "Subprocess module for Lua",
detailed = [[
]],
homepage = "https://github.com/huakim/lua-subprocess",
license = "LGPL"
}
dependencies = {
"lua >= 5.1"
}
build = {
platforms = {
unix = {
type = "builtin",
modules = {
subprocess = {
sources = { "subprocess.c", "liolib-copy.c" },
defines = { "OS_POSIX", "_GNU_SOURCE" }
}
}
},
windows = {
type = "builtin",
modules = {
subprocess = {
sources = { "subprocess.c", "liolib-copy.c" },
defines = { "OS_WINDOWS", "LUA_BUILD_AS_DLL", "_CRT_SECURE_NO_WARNINGS", "_GNU_SOURCE" }
}
}
}
}
}
'''
rockspec = 'text://'+rockspec
for template in ('rock.rockspec', 'generic.spec', 'obs.obsinfo'): main(['generate', '--rockspec',rockspec,'--template',template])