6.12. pigz 2.8

pigz is a parallel gzip-compatible compressor and decompressor.

Input assumption: pigz-2.8.tar.gz is already present in LBI_SOURCES from the chapter 4 source staging step.

Licenses:

Dependencies:

pigz is a parallel gzip-compatible compressor and decompressor. we need it to replace gzip functionality in the target userspace with multi-core capable compression and decompression.

Replacement Symlinks

To replace gzip-family commands, this package should provide these command names in PATH:

Optional additional compatibility names can be added later as needed.

Extract and Enter the Source Tree

cd "$LBI_SOURCES"
tar -xf pigz-2.8.tar.gz
cd pigz-2.8

Build pigz

make $LWI_MAKE_FLAGS \
    CC="$LBI_ROOT/system/tools/bin/$LBI_TARGET-clang" \
    CFLAGS="-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual --target=$LBI_TARGET --sysroot=$LBI_ROOT $LWI_CFLAGS" \
    LDFLAGS="--target=$LBI_TARGET --sysroot=$LBI_ROOT -L$LBI_ROOT/system/libraries $LBI_CUSTOM_LDFLAGS"

Install pigz

install -Dm755 pigz "$LBI_ROOT/system/binaries/pigz"
install -Dm755 unpigz "$LBI_ROOT/system/binaries/unpigz"
install -Dm644 pigz.1 "$LBI_ROOT/system/documentation/man-pages/man1/pigz.1"

Install gzip Compatibility Symlinks

ln -sf pigz "$LBI_ROOT/system/binaries/gzip"
ln -sf unpigz "$LBI_ROOT/system/binaries/gunzip"
ln -sf unpigz "$LBI_ROOT/system/binaries/zcat"

Command Explanations