mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: add lrzip compression support
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
390b08f18b
commit
572b1a5de7
@ -240,14 +240,16 @@ Options
|
|||||||
This value is used when querying a package to see who was the builder.
|
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.
|
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
|
Sets the command and options used when compressing compiled or source
|
||||||
packages in the named format.
|
packages in the named format.
|
||||||
|
|
||||||
**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
|
**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
|
||||||
Sets the compression used when making compiled or source packages. The
|
Sets the compression used when making compiled or source packages. The
|
||||||
current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, and
|
current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`,
|
||||||
`.tar.Z`.
|
`.tar.lrz` and `.tar.Z`.
|
||||||
Do not touch these unless you know what you are doing.
|
Do not touch these unless you know what you are doing.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
|
@ -1826,6 +1826,7 @@ create_package() {
|
|||||||
*tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
|
*tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
|
||||||
*tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;;
|
*tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;;
|
||||||
*tar.xz) ${COMPRESSXZ[@]:-xz -c -z -} ;;
|
*tar.xz) ${COMPRESSXZ[@]:-xz -c -z -} ;;
|
||||||
|
*tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;;
|
||||||
*tar.Z) ${COMPRESSZ[@]:-compress -c -f} ;;
|
*tar.Z) ${COMPRESSZ[@]:-compress -c -f} ;;
|
||||||
*tar) cat ;;
|
*tar) cat ;;
|
||||||
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
||||||
@ -1938,10 +1939,11 @@ create_srcpackage() {
|
|||||||
|
|
||||||
local TAR_OPT
|
local TAR_OPT
|
||||||
case "$SRCEXT" in
|
case "$SRCEXT" in
|
||||||
*tar.gz) TAR_OPT="z" ;;
|
*tar.gz) TAR_OPT="-z" ;;
|
||||||
*tar.bz2) TAR_OPT="j" ;;
|
*tar.bz2) TAR_OPT="-j" ;;
|
||||||
*tar.xz) TAR_OPT="J" ;;
|
*tar.xz) TAR_OPT="-J" ;;
|
||||||
*tar.Z) TAR_OPT="Z" ;;
|
*tar.lrz) TAR_OPT="--lrzip" ;;
|
||||||
|
*tar.Z) TAR_OPT="-Z" ;;
|
||||||
*tar) TAR_OPT="" ;;
|
*tar) TAR_OPT="" ;;
|
||||||
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
||||||
"$SRCEXT" ;;
|
"$SRCEXT" ;;
|
||||||
@ -1953,7 +1955,7 @@ create_srcpackage() {
|
|||||||
# tar it up
|
# tar it up
|
||||||
msg2 "$(gettext "Compressing source package...")"
|
msg2 "$(gettext "Compressing source package...")"
|
||||||
cd_safe "${srclinks}"
|
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.")"
|
error "$(gettext "Failed to create source package file.")"
|
||||||
exit 1 # TODO: error code
|
exit 1 # TODO: error code
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user