-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnewinstall.example
More file actions
167 lines (142 loc) · 3.72 KB
/
newinstall.example
File metadata and controls
167 lines (142 loc) · 3.72 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
bigfut.py: self.install_files(self.export_dir)
portal.py: self.install_files(self.export_dir, self.src_dir)
zenfire.py: self.install_files(os.path.join(self.release_dir, self.fq_release_name))
isntall should always default to deploy_dir, tmpl can override to release dir if it wants
makes a lot more sense, and is easier to understand
scopy == smart copy (minify, etc unless fax.debug_info)
maybe property for that, so can minify tmpl output
never
smart
always
content chain?
tmpl | minify | compress
transform chain for paths
TMP:
dir_group():
file_group():
for each copy type
source chain
glob | skip |
### defaults
## tmpl def dir? (maybe should be build dir as well)
## files build dir
## XXX for non build projects like py, build should just cp -a the source tree - then any modifications aren't done in the "pure" source
## everything then could default to build dir, for cmake, et al, either make an install rule that copies to the "stage" like normal, or do {{fax.src_dir}}
dest defaults to deploy
group ::= <type><source><dest>
name ::= <identifier>
type ::= copy|tmpl|scopy
modifer ::= pattern/replace
source ::= <source> files|optfiles|dir|glob|regex
recurse ::= bool
// regex for files to skip
groupdef:
*source
files:
optfiles:
recurse: dir
type: copytype
source : optoin
group0:
type: copy
glob: *
files:
- file0
- file1
optfiles:
- ifexists0
- ifexists1
{
"install": [
// "install_files" : [
// files relative to build dir
{
"type": "files"
"glob": "*",
"dir": "stage",
"pattern": "^stage/",
"replace": ""
},
{
"type": "files",
"system": "linux",
"pattern": "^%BUILDDIRNAME%/",
"replace": "lib64/",
"files": [
"%BUILDDIRNAME%/libzenfire.a",
"%BUILDDIRNAME%/libtwentyc.a",
"%BUILDDIRNAME%/libzenfire.so",
"%BUILDDIRNAME%/libtwentyc.so"
]
},
"type": "copy"
{
"type": "files"
"pattern": "^%SRCDIRNAME%/",
"replace": "",
"files": [
"%SRCDIRNAME%/README.txt",
"%SRCDIRNAME%/CHANGES.txt"
]
},
{
"type": "tmpl",
// templates relative to define_dir unless abs or ./ ../
"dir": "tmpl"
"render_files": true
// regex for files to skip
"skip":
}
],
"system_files" : {
"linux":
[
{
"pattern": "^%BUILDDIRNAME%/",
"replace": "lib64/",
"files": [
"%BUILDDIRNAME%/libzenfire.a",
"%BUILDDIRNAME%/libtwentyc.a",
"%BUILDDIRNAME%/libzenfire.so",
"%BUILDDIRNAME%/libtwentyc.so"
]
}
],
"windows":
[
{
"pattern": "^%BUILDDIRNAME%/",
"replace": "lib64/",
"files": [
"%BUILDDIRNAME%/%CONFIGURATION_NAME%/zenfire.lib",
"%BUILDDIRNAME%/%CONFIGURATION_NAME%/twentyc.lib"
],
"optfiles": [
"%BUILDDIRNAME%/libeay32.lib",
"%BUILDDIRNAME%/ssleay32.lib",
"%BUILDDIRNAME%/libeay32MD.lib",
"%BUILDDIRNAME%/ssleay32MD.lib",
"%BUILDDIRNAME%/libeay32MDd.lib",
"%BUILDDIRNAME%/ssleay32MDd.lib"
]
}
]
}
}
legacu:
- def install_files(self, dst_dir, src_dir=None):
- if not os.path.exists(dst_dir):
- self.mkdir(dst_dir)
-
- if not src_dir:
- src_dir = self.fq_build_dir
-
- self.chdir(src_dir)
-
- if "install_files" in self.defined:
- for each in self.defined['install_files']:
- self._package_group(each, dst_dir)
-
- if "system_files" in self.defined:
- for each in self.defined['system_files'][self.system]:
- self._package_group(each, dst_dir)