summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-11 20:43:29 +0100
committerSam James <sam@gentoo.org>2022-10-13 20:57:53 +0100
commit375703a32fcb3885dec6a435bf44ea11650d0c80 (patch)
treed2d46b0d33021b5bceaa9194fe81545f7fdde814 /eclass/linux-mod.eclass
parentlinux-mod.eclass: compress xz/zstd in parallel (diff)
downloadgentoo-375703a32fcb3885dec6a435bf44ea11650d0c80.tar.gz
gentoo-375703a32fcb3885dec6a435bf44ea11650d0c80.tar.bz2
gentoo-375703a32fcb3885dec6a435bf44ea11650d0c80.zip
linux-mod.eclass: use pigz for parallel compression if available
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 8f511ba8ff05..e837916b881a 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -719,7 +719,11 @@ linux-mod_src_install() {
xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
doins ${modulename}.${KV_OBJ}.xz || die "doins ${modulename}.${KV_OBJ}.xz failed"
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
- gzip ${modulename}.${KV_OBJ}
+ if type -P pigz ; then
+ pigz -n$(makeopts_jobs) ${modulename}.${KV_OBJ}
+ else
+ gzip ${modulename}.${KV_OBJ}
+ fi
doins ${modulename}.${KV_OBJ}.gz || die "doins ${modulename}.${KV_OBJ}.gz failed"
elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ}