summaryrefslogtreecommitdiff
path: root/templates/wscript
blob: 2c2a9efb4414c9a7f2bbb4774b3accb01300d2af (plain)
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
#!/usr/bin/python

import os
import glob

srcdir = '.'
blddir = 'build'

def build(bld):
    
    subst_dict = {}
    if bld.env['COREAUDIO']:
        subst_dict['%JACK_INPUT%'] = 'coreaudio:Built-in Audio:in'
        subst_dict['%JACK_OUTPUT%'] = 'coreaudio:Built-in Audio:out'
    else:
        subst_dict['%JACK_INPUT%'] = 'alsa_pcm:playback_'
        subst_dict['%JACK_OUTPUT%'] = 'alsa_pcm:capture_'

    templates = glob.glob(os.path.join(bld.get_curdir(), '*.template.in'))
    for t in templates:
        b = os.path.basename(t)
        obj = bld.new_task_gen('subst')
        obj.source = b
        obj.target = b.replace('.in', '')
        obj.dict = subst_dict
        obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', 'templates')

def set_options(opt):
    pass