mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: allow specifying compression options
Adds the ability to override the commands used to compressing compiled and source packages. This is useful for those wanting to use alternative implementations of the compression tools or non-default compression options. Allan: documented options in man page Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
e85e77e6f9
commit
09a93b2e0e
@ -213,6 +213,10 @@ 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)"::
|
||||||
|
Sets the command and options used when compressing compiled or source
|
||||||
|
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`, and
|
||||||
|
@ -106,6 +106,16 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
|||||||
#-- Specify a key to use for package signing
|
#-- Specify a key to use for package signing
|
||||||
#GPGKEY=""
|
#GPGKEY=""
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# COMPRESSION DEFAULTS
|
||||||
|
#########################################################################
|
||||||
|
#
|
||||||
|
COMPRESSGZ=(gzip -c -f -n)
|
||||||
|
COMPRESSBZ2=(bzip2 -c -f)
|
||||||
|
COMPRESSXZ=(xz -c -z -)
|
||||||
|
COMPRESSZ=(compress -c -f)
|
||||||
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# EXTENSION DEFAULTS
|
# EXTENSION DEFAULTS
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
@ -1294,10 +1294,10 @@ create_package() {
|
|||||||
# Disable bsdtar compression and use gzip -n for now.
|
# Disable bsdtar compression and use gzip -n for now.
|
||||||
bsdtar -cf - $comp_files * |
|
bsdtar -cf - $comp_files * |
|
||||||
case "$PKGEXT" in
|
case "$PKGEXT" in
|
||||||
*tar.gz) gzip -c -f -n ;;
|
*tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
|
||||||
*tar.bz2) bzip2 -c -f ;;
|
*tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;;
|
||||||
*tar.xz) xz -c -z - ;;
|
*tar.xz) ${COMPRESSXZ[@]:-xz -c -z -} ;;
|
||||||
*tar.Z) 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.")" \
|
||||||
"$PKGEXT"; cat ;;
|
"$PKGEXT"; cat ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user