-
Notifications
You must be signed in to change notification settings - Fork 92
/
pkg.yaml
42 lines (37 loc) · 1.05 KB
/
pkg.yaml
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
name: musl
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- image: "{{ .TOOLS_IMAGE }}"
steps:
- sources:
- url: https://www.musl-libc.org/releases/musl-{{ .musl_version }}.tar.gz
destination: musl.tar.gz
sha256: "{{ .musl_sha256 }}"
sha512: "{{ .musl_sha512 }}"
prepare:
- |
export PATH=${TOOLCHAIN}/cross/bin:${PATH}
tar -xzf musl.tar.gz --strip-components=1
patch -p1 < /pkg/patches/handle-aux-at-base.patch
mkdir /bin
ln -sv /toolchain/bin/bash /bin/sh
mkdir build
cd build
# From https://www.musl-libc.org/doc/1.0.0/manual.html:
# $(syslibdir), $(includedir), and $(libdir) refer to the paths
# chosen at build time (by default, /lib, $(prefix)/include, and
# $(prefix)/lib, respectively)
../configure \
--prefix=/usr
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make DESTDIR=/rootfs install
finalize:
- from: /rootfs
to: /