summaryrefslogtreecommitdiff
path: root/elements/gnu-toolchain/stage2-fhs-dirs.bst
blob: 128f2f6c2e4583c96a55d1349e1aade1d9fce882 (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: baserock:baserock/fhs-dirs
  track: baserock/usr_merge
  ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5

depends:
- filename: gnu-toolchain/stage1.bst
  type: build

variables:
  prefix: /tools

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

config:
  install-commands:
  - sh ./create-fhs-dirs "%{install-root}"
  - rmdir "%{install-root}/usr/bin"
  - ln -s "%{prefix}/bin" "%{install-root}/usr/bin"
  - install -m 644 passwd "%{install-root}/etc/passwd"
  - install -m 600 shadow "%{install-root}/etc/shadow"
  - install -m 644 interfaces "%{install-root}/etc/network/interfaces"
  - install -m 644 group "%{install-root}/etc/group"
  - install -m 644 issue "%{install-root}/etc/issue"
  - install -m 644 services "%{install-root}/etc/services"
  - install -m 644 protocols "%{install-root}/etc/protocols"
  - echo baserock > "%{install-root}/etc/hostname"

  # Most 64 bit architectures need a /lib64 symlink as well as /lib.
  # FIXME: the create-fhs-dirs script should probably handle this...
  (?):
    - arch in ["armv8b64", "armv8l64", "ppc64l", "ppc64b", "x86_64"]:
        install-commands:
          (>):
          - mkdir -p "%{install-root}/usr/lib64"
          - ln -s  "./usr/lib64" "%{install-root}/lib64"