summaryrefslogtreecommitdiffstats
path: root/examples/recipes/busybox@1.34.0.yml
blob: bb62dc61fcbc7d27fb07d3c9fef8f518c4599cb7 (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
tasks:
  unpack:
    fetch:
      - name: '{{pn}}-{{pv}}.tar.bz2'
        sha256: 'ec8d1615edb045b83b81966604759c4d4ac921434ab4011da604f629c06074ce'
    run: |
      tar xf {{dldir}}/{{pn}}-{{pv}}.tar.bz2


  configure:
    inherit:
      task: 'unpack'
    run: |
      mkdir {{pn}}-build
      cd {{pn}}-build
      make \
        -f ../{{pn}}-{{pv}}/Makefile \
        KBUILD_SRC=../{{pn}}-{{pv}} \
        defconfig

  compile:
    args:
      host: 'platform'
    inherit:
      task: 'configure'
    build_depends:
      - recipe: 'toolchain'
        task: 'build_depends'
    depends:
      - recipe: 'toolchain'
        task: 'depends'
    run: |
      cd {{pn}}-build
      make \
        ARCH={{host.karch}} \
        CROSS_COMPILE={{cross_compile}} \
        EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \
        {{pn}} busybox.links
      sed -i \
        -e 's@^/usr@@' \
        -e 's@^/sbin@/bin@' \
        {{pn}}.links

  install:
    args:
      host: 'platform'
    inherit:
      task: 'compile'
    output:
      default:
        runtime_depends:
          - recipe: 'toolchain'
            task: 'depends'
    run: |
      cd {{pn}}-build
      make \
        ARCH={{host.karch}} \
        CROSS_COMPILE={{cross_compile}} \
        EXTRA_CFLAGS='-DBB_EXTRA_VERSION=""' \
        CONFIG_PREFIX={{destdir}}{{host.prefix}} \
        install
      rm {{destdir}}{{host.prefix}}/bin/strings