summaryrefslogtreecommitdiff
path: root/buildstream/data/projectconfig.yaml
blob: 6f7831b12eb8f500d83783141b8513c909cfb9fa (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
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
# Default BuildStream project configuration.

# Project name
#
# name: myproject


# Alias configuration
#
# Aliases are entirely project specific, they are
# configured as a simple dictionary, example:
#
# aliases:
#   baserock: git://git.baserock.org/baserock/
#   freedesktop: git://anongit.freedesktop.org/


# Plugin path configuration
#
# You may specify one or more project relative paths to
# subdirectories where plugins should be loaded from.
#
# plugins:
#
#   elements:
#   - plugins/local-elements
#   - plugins/shared-elements
#
#   sources:
#   - plugins/local-sources


# Variable Configuration
#
# You may override the defaults of variables on a project wide
# basis by specifying the 'variables' attribute.
#
# The defaults for this version of buildstream are listed
# below.
#
variables:

  # Maximum number of parallel build processes within a given
  # build, support for this is conditional on the element type
  # and the build system used (any element using 'make' can
  # implement this).
  #
  # Note: this value defaults to the number of cores available
  max-jobs: 4

  # Path configuration, to be used in build instructions.
  #
  prefix: "/usr"
  exec_prefix: "%{prefix}"
  bindir: "%{exec_prefix}/bin"
  sbindir: "%{exec_prefix}/sbin"
  libexecdir: "%{exec_prefix}/libexecdir"
  datadir: "%{prefix}/share"
  sysconfdir: "/etc"
  sharedstatedir: "%{prefix}/com"
  localstatedir: "/var"
  lib: "lib"
  libdir: "%{prefix}/%{lib}"
  includedir: "%{prefix}/include"
  infodir: "%{prefix}/info"
  mandir: "%{prefix}/man"

  # Indicates the build installation directory in the sandbox
  install-root: /buildstream/install

  # Define some patterns which might be used in multiple
  # elements
  strip-binaries: |

    find "%{install-root}" -type f \
      '(' -perm -111 -o -name '*.so*' -o -name '*.cmxs' -o -name '*.node' ')' \
      -exec sh -ec \
      'read -n4 hdr <"$1" # check for elf header
       if [ "$hdr" != "$(printf \\x7fELF)" ]; then
           exit 0
       fi
       debugfile="%{install-root}%{libdir}/debug/$(basename "$1")"
       mkdir -p "$(dirname "$debugfile")"
       objcopy --only-keep-debug "$1" "$debugfile"
       chmod 644 "$debugfile"
       strip --remove-section=.comment --remove-section=.note --strip-unneeded "$1"
       objcopy --add-gnu-debuglink "$debugfile" "$1"' - {} ';'


# Base sandbox environment, can be overridden by plugins
environment:
  PATH: /usr/bin:/bin:/usr/sbin:/sbin
  SHELL: /bin/sh
  TERM: dumb
  USER: tomjon
  USERNAME: tomjon
  LOGNAME: tomjon
  LC_ALL: C
  HOME: /tmp
  TZ: UTC

# List of environment variables which should not be taken into
# account when calculating a cache key for a given element.
#
# E.g.
#
environment-nocache: []


# Specify devices which should be available in the sandbox
devices:
- /dev/console
- /dev/full
- /dev/null
- /dev/urandom
- /dev/zero


# Element Overrides
#
# Base attributes declared by element default yaml files
# can be overridden on a project wide basis. The elements
# dictionary can be used to override variables, environments
# or plugin specific configuration data as shown below.
#
#
# elements:
#
#   autotools:
#
#     variables:
#       bindir: %{prefix}/bin
#
#     config:
#       configure-commands: ...
#
#     environment:
#       PKG_CONFIG_PATH=%{libdir}/pkgconfig
#