summaryrefslogtreecommitdiff
path: root/elements/gnu-toolchain/linux-api-headers.bst
blob: ceb345783e8f4d81940f80014565a137cc211683 (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
kind: manual

sources:
- kind: git
  url: upstream:linux
  track: v4.17
  ref: 29dcea88779c856c7dc92040a0c01233263101d4

depends:
- filename: gnu-toolchain/stage2.bst
  type: build
- gnu-toolchain/fhs-dirs.bst

variables:
  kernel-arch: unsupported
  (?):
    - arch in ["armv5", "armv7b", "armv7l", "armv7lhf"]:
        kernel-arch: arm
    - arch in ["armv8b64", "armv8l64"]:
        kernel-arch: arm64
    - arch in ["ppc64b", "ppc64l"]:
        kernel-arch: powerpc
    - arch == "x86_32":
        kernel-arch: i386
    - arch == "x86_64":
        kernel-arch: x86_64

environment:
  PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin

config:
  install-commands:
  - |
    if [ '%{kernel-arch}' == 'unsupported' ]; then
        echo "Error: unsupported architecture: %{arch}" >&2
        exit 1
    fi
    ARCH=%{kernel-arch} make INSTALL_HDR_PATH=dest headers_install
  - install -d "%{install-root}%{includedir}"
  - cp -r dest/include/* "%{install-root}%{includedir}"