File: wscript

package info (click to toggle)
jackd2 1.9.17~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,524 kB
  • sloc: cpp: 48,028; ansic: 30,427; python: 12,448; sh: 270; makefile: 60
file content (36 lines) | stat: -rw-r--r-- 1,163 bytes parent folder | download | duplicates (4)
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
#! /usr/bin/python3
# encoding: utf-8


def set_systemd_user_unit_dir(conf):
    """
    Adding systemd's user unit dir (by using pkg-config) to the configuration.
    """
    systemd_user_unit_dir = conf.check_cfg(
            package='systemd',
            args='--variable=systemduserunitdir',
            okmsg='Successfully detected systemd user unit dir.',
            errormsg='Could not detect systemd user unit dir. Skipping...')
    if not systemd_user_unit_dir:
        conf.env['SYSTEMD_USER_UNIT_DIR'] = None
    else:
        conf.env['SYSTEMD_USER_UNIT_DIR'] = \
                systemd_user_unit_dir.replace("\n", "")


def configure(conf):
    set_systemd_user_unit_dir(conf)
    conf.env['JACK_USER_UNIT_CONFIG_DIR'] = '/etc/jack'


def build(bld):
    if bld.env['SYSTEMD_USER_UNIT_DIR']:
        bld.install_files(
                bld.env['JACK_USER_UNIT_CONFIG_DIR'],
                bld.path.ant_glob('*.conf'))
        bld(
                features='subst',
                source='jack@.service.in',
                target='jack@.service',
                install_path=bld.env.SYSTEMD_USER_UNIT_DIR,
                PREFIX=bld.env.PREFIX)