File: SConscript

package info (click to toggle)
mypaint-brushes 1.3.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,336 kB
  • sloc: makefile: 377; sh: 149
file content (35 lines) | stat: -rw-r--r-- 1,316 bytes parent folder | download
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
import os, sys

Import('env', 'install_perms', 'mypaint_brushes_api_version', 'mypaint_brushes_version')

# Generate a @pkgconfig_name.pc and a @pkgconfig_name-uninstalled.pc
def create_pkgconfig_files(env, pkgconfig_name, api_version, version, description,
                           deps, libs=[], linkflags=[], cflags=[]):

    pkg_info = {
        '@NAME@': pkgconfig_name,
        '@REQUIRES@': ' '.join(deps),
        '@DESCRIPTION@': description,
        '@API_VERSION@': api_version,
        '@VERSION@': version,
        '@LIBS@': ''.join('-l'+lib for lib in libs),
        '@LINKFLAGS@': ' '.join(linkflags),
        '@PREFIX@': env['prefix'],
        '@LIBDIR@': os.path.join(env['prefix'], 'lib'),
        '@DATADIR@': os.path.join(env['prefix'], 'share'),
        '@INCLUDEDIR@': os.path.join(env['prefix'], 'include'),
    }
    pc_file = env.Substfile('%s-%s.pc' % (pkgconfig_name, api_version),
                            "pkgconfig.pc.in", SUBST_DICT=pkg_info)
    install_perms(env, '$prefix/share/pkgconfig', pc_file)

    return pc_file

env = env.Clone()

Export('env')

env.Append(CPPPATH='./')
create_pkgconfig_files(env, 'mypaint-brushes',
                       mypaint_brushes_api_version, mypaint_brushes_version,
                       'MyPaint brushes', deps=[], libs=[], linkflags=[])