Skip to content

Commit 0cbb128

Browse files
alexhereticallanmcrae
authored andcommitted
Add lz4 compression support to makepkg
Adds opt-in lz4 compression of *pkg.tar files with makepkg. This is nice to have as an option for very fast compression and is already installed with libarchive. Signed-off-by: Alex Butler<[email protected]> Signed-off-by: Allan McRae <[email protected]>
1 parent fd16da2 commit 0cbb128

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

doc/makepkg.conf.5.asciidoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,15 @@ Options
251251
**COMPRESSXZ=**"(xz -c -z -)"::
252252
**COMPRESSLZO**"(lzop -q)"::
253253
**COMPRESSLRZ=**"(lrzip -q)"::
254+
**COMPRESSLZ4=**"(lz4 -q)"::
254255
**COMPRESSZ=**"(compress -c -f)"::
255256
Sets the command and options used when compressing compiled or source
256257
packages in the named format.
257258

258259
**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
259260
Sets the compression used when making compiled or source packages.
260261
Valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`,
261-
`.tar.lzo`, `.tar.lrz`, and `.tar.Z`.
262+
`.tar.lzo`, `.tar.lrz`, `.tar.lz4`, and `.tar.Z`.
262263
Do not touch these unless you know what you are doing.
263264

264265

etc/makepkg.conf.in

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ COMPRESSXZ=(xz -c -z -)
133133
COMPRESSLRZ=(lrzip -q)
134134
COMPRESSLZO=(lzop -q)
135135
COMPRESSZ=(compress -c -f)
136+
COMPRESSLZ4=(lz4 -q)
136137

137138
#########################################################################
138139
# EXTENSION DEFAULTS

scripts/libmakepkg/util/compress.sh.in

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ compress_as() {
4040
*tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;;
4141
*tar.lzo) ${COMPRESSLZO[@]:-lzop -q} ;;
4242
*tar.Z) ${COMPRESSZ[@]:-compress -c -f} ;;
43+
*tar.lz4) ${COMPRESSLZ4[@]:-lz4 -q} ;;
4344
*tar) cat ;;
4445
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
4546
"$ext"; cat ;;

0 commit comments

Comments
 (0)