kiss: Added lzma support to sources and tarballs

This commit is contained in:
Dylan Araps 2020-05-07 16:25:18 +03:00
parent 6415605174
commit 931b2e13f3
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
2 changed files with 12 additions and 10 deletions

20
kiss
View File

@ -138,11 +138,12 @@ run_hook() {
decompress() { decompress() {
case $1 in case $1 in
*.bz2) bzip2 -d ;; *.bz2) bzip2 -d ;;
*.xz) xz -dcT 0 ;; *.xz) xz -dcT 0 ;;
*.tgz|*.gz) gzip -d ;; *.tgz|*.gz) gzip -d ;;
*.zst) zstd -dc ;; *.zst) zstd -dc ;;
*.tar) cat ;; *.lzma|*.lz) lzma -dc ;;
*.tar) cat ;;
esac < "$1" esac < "$1"
} }
@ -600,10 +601,11 @@ pkg_tar() (
# Create a tarball from the contents of the built package. # Create a tarball from the contents of the built package.
"$tar" cf - . | case ${KISS_COMPRESS:=gz} in "$tar" cf - . | case ${KISS_COMPRESS:=gz} in
bz2) bzip2 -z ;; bz2) bzip2 -z ;;
gz) gzip -6 ;; gz) gzip -6 ;;
xz) xz -zT 0 ;; xz) xz -zT 0 ;;
zst) zstd -z ;; zst) zstd -z ;;
lzma) lzma -z ;;
esac > "$bin_dir/$1#$version-$release.tar.${KISS_COMPRESS:=gz}" esac > "$bin_dir/$1#$version-$release.tar.${KISS_COMPRESS:=gz}"
log "$1" "Successfully created tarball" log "$1" "Successfully created tarball"

2
kiss.1
View File

@ -101,7 +101,7 @@ export KISS_KEEPLOG=0
# Compression method to use for package tarballs. # Compression method to use for package tarballs.
# #
# Valid options: 'bz2', 'gz' (default), 'xz', 'zst' # Valid options: 'bz2', 'gz' (default), 'lzma', 'xz', 'zst'
export KISS_COMPRESS=gz export KISS_COMPRESS=gz
# Keep build, package and extraction cache directories for debugging # Keep build, package and extraction cache directories for debugging