-
Notifications
You must be signed in to change notification settings - Fork 6
/
dist_config.py
42 lines (37 loc) · 1.02 KB
/
dist_config.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
import os
package = 'libt3widget'
excludesrc = '/(Makefile|TODO.*|SciTE.*|run\.sh|test\.c)$'
auxsources= [ 'src/widget_api.h' ]
extrabuilddirs = [ 'doc' ]
auxfiles = [ 'doc/doxygen.conf', 'doc/DoxygenLayout.xml', 'doc/main_doc.h' ]
versioninfo = '2:0:0'
def get_replacements(mkdist):
return [
{
'tag': '<VERSION>',
'replacement': mkdist.version
},
{
'tag': '^#define T3_WIDGET_VERSION .*',
'replacement': '#define T3_WIDGET_VERSION ' + mkdist.get_version_bin(),
'files': [ 'src/main.h' ],
'regex': True
},
{
'tag': '<OBJECTS>',
'replacement': " ".join(mkdist.sources_to_objects(mkdist.exclude_by_regex(mkdist.sources, '^src/x11.cc'), '\.cc$', '.lo')),
'files': [ 'Makefile.in' ]
},
{
'tag': '<VERSIONINFO>',
'replacement': versioninfo,
'files': [ 'Makefile.in' ]
},
{
'tag': '<LIBVERSION>',
'replacement': versioninfo.split(':', 2)[0],
'files': [ 'Makefile.in', 'config.pkg' ]
}
]
def finalize(mkdist):
os.symlink('.', os.path.join(mkdist.topdir, 'src', 't3widget'))