-
Notifications
You must be signed in to change notification settings - Fork 130
/
Copy pathpkg.yaml
53 lines (52 loc) · 1.78 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
43
44
45
46
47
48
49
50
51
52
53
name: util-linux-tools
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
- url: https://www.kernel.org/pub/linux/utils/util-linux/v{{ regexReplaceAll ".\\d+$" .UTIL_LINUX_VERSION "${1}" }}/util-linux-{{ regexReplaceAll "\\.0$" .UTIL_LINUX_VERSION "${1}" }}.tar.xz
destination: util-linux.tar.xz
sha256: 5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79
sha512: 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124
prepare:
- |
tar -xJf util-linux.tar.xz --strip-components=1
mkdir build
cd build
../configure \
--prefix=/usr/local \
--without-python \
--disable-bash-completion \
--disable-asciidoc \
--disable-makeinstall-chown \
--without-systemd \
--without-systemdsystemunitdir \
--disable-all-programs \
--enable-libmount \
--enable-libblkid \
--enable-nsenter \
--enable-fstrim \
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
build:
- |
cd build
make install-strip -j $(nproc)
install:
- |
cd build
mkdir /rootfs
make install DESTDIR=/rootfs
rm -rf /rootfs/usr/local/{include,lib,share}
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /