Signed-off-by: Allan McRae <[email protected]>
---

This will be available with libarchive-3.1.  Although, we pipe the tarball to
stdin for compression, so lrzip will not perform as well as some may hope...

 doc/makepkg.conf.5.txt |  8 +++++---
 scripts/makepkg.sh.in  | 12 +++++++-----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 052b342..34748de 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -240,14 +240,16 @@ Options
        This value is used when querying a package to see who was the builder.
        It is recommended you change this to your name and email address.
 
-**COMPRESSGZ=**"(gzip -c -f -n)", **COMPRESSBZ2=**"(bzip2 -c -f)", 
**COMPRESSXZ=**"(xz -c -z -)", **COMPRESSZ=**"(compress -c -f)"::
+**COMPRESSGZ=**"(gzip -c -f -n)", **COMPRESSBZ2=**"(bzip2 -c -f)",
+**COMPRESSXZ=**"(xz -c -z -)", **COMPRESSLRZ=**"(lrzip -q)",
+**COMPRESSZ=**"(compress -c -f)"::
        Sets the command and options used when compressing compiled or source
        packages in the named format.
 
 **PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
        Sets the compression used when making compiled or source packages. The
-       current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, and
-       `.tar.Z`.
+       current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`,
+       `.tar.lrz` and `.tar.Z`.
        Do not touch these unless you know what you are doing.
 
 See Also
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c464ec7..e79a468 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1826,6 +1826,7 @@ create_package() {
                *tar.gz)  ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
                *tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;;
                *tar.xz)  ${COMPRESSXZ[@]:-xz -c -z -} ;;
+               *tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;;
                *tar.Z)   ${COMPRESSZ[@]:-compress -c -f} ;;
                *tar)     cat ;;
                *) warning "$(gettext "'%s' is not a valid archive 
extension.")" \
@@ -1938,10 +1939,11 @@ create_srcpackage() {
 
        local TAR_OPT
        case "$SRCEXT" in
-               *tar.gz)  TAR_OPT="z" ;;
-               *tar.bz2) TAR_OPT="j" ;;
-               *tar.xz)  TAR_OPT="J" ;;
-               *tar.Z)   TAR_OPT="Z" ;;
+               *tar.gz)  TAR_OPT="-z" ;;
+               *tar.bz2) TAR_OPT="-j" ;;
+               *tar.xz)  TAR_OPT="-J" ;;
+               *tar.lrz) TAR_OPT="--lrzip" ;;
+               *tar.Z)   TAR_OPT="-Z" ;;
                *tar)     TAR_OPT=""  ;;
                *) warning "$(gettext "'%s' is not a valid archive 
extension.")" \
                "$SRCEXT" ;;
@@ -1953,7 +1955,7 @@ create_srcpackage() {
        # tar it up
        msg2 "$(gettext "Compressing source package...")"
        cd_safe "${srclinks}"
-       if ! bsdtar -c${TAR_OPT}Lf "$pkg_file" ${pkgbase}; then
+       if ! bsdtar -cL ${TAR_OPT} -f "$pkg_file" ${pkgbase}; then
                error "$(gettext "Failed to create source package file.")"
                exit 1 # TODO: error code
        fi
-- 
1.8.1.3


Reply via email to