forked from siderolabs/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkg.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: d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3
sha512: ffe20b915a518a150401d429b0338bc7022190e4ca0ef91a6d9eea345db8c1e11ad01784163b8fcf978506f3f5cad473f29d5d4ef93a4c66a5ae0ebd9fb0c8f2
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: /