pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Start removal of PKG_SUFX as option by making selec...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e70ebabd685a
branches:  trunk
changeset: 571202:e70ebabd685a
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Feb 09 23:02:13 2010 +0000

description:
Start removal of PKG_SUFX as option by making selection of compression
format a separate new option (PKG_COMPRESSION).

diffstat:

 mk/defaults/mk.conf      |  11 ++++++-----
 mk/flavor/pkg/package.mk |  13 ++++++++++++-
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (53 lines):

diff -r 2320f8ea93cf -r e70ebabd685a mk/defaults/mk.conf
--- a/mk/defaults/mk.conf       Tue Feb 09 22:55:16 2010 +0000
+++ b/mk/defaults/mk.conf       Tue Feb 09 23:02:13 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.186 2009/09/13 13:28:46 tron Exp $
+# $NetBSD: mk.conf,v 1.187 2010/02/09 23:02:13 joerg Exp $
 #
 
 # This file provides default values for variables that may be overridden
@@ -79,10 +79,11 @@
 # Possible: defined, not defined
 # Default: not defined
 
-#PKG_SUFX= .tbz
-# Create binary packages with bzip2(1) or gzip(1).
-# Possible: .tbz, .tgz
-# Default: .tgz
+PKG_COMPRESSION?=      gzip
+# Compression algorithm for binary packages.
+# Possible: gzip, bzip2, none
+# Default: gzip
+# Supersedes the PKG_SUFX option and keeps the name consistent.
 
 PKGSRC_LOCKTYPE?= none
 #      The type of locking that will be done if competing processes
diff -r 2320f8ea93cf -r e70ebabd685a mk/flavor/pkg/package.mk
--- a/mk/flavor/pkg/package.mk  Tue Feb 09 22:55:16 2010 +0000
+++ b/mk/flavor/pkg/package.mk  Tue Feb 09 23:02:13 2010 +0000
@@ -1,5 +1,15 @@
-# $NetBSD: package.mk,v 1.19 2009/11/05 15:39:42 joerg Exp $
+# $NetBSD: package.mk,v 1.20 2010/02/09 23:02:13 joerg Exp $
 
+.if defined(PKG_SUFX)
+WARNINGS+=             "PKG_SUFX is deprecated, please use PKG_COMPRESSION"
+.  if ${PKG_SUFX} == ".tgz"
+PKG_COMPRESSION=       gzip
+.  elif ${PKG_SUFX} == ".tbz"
+PKG_COMPRESSION=       bzip2
+.  else
+WARNINGS+=             "Unsupported value for PKG_SUFX"
+.  endif
+.endif
 PKG_SUFX?=             .tgz
 PKGFILE?=              ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
 PKGREPOSITORY?=                ${PACKAGES}/${PKGREPOSITORYSUBDIR}
@@ -25,6 +35,7 @@
 package-create: package-remove ${PKGFILE} package-links
 
 _PKG_ARGS_PACKAGE+=    ${_PKG_CREATE_ARGS}
+_PKG_ARGS_PACKAGE+=    -F ${PKG_COMPRESSION}
 .if ${_USE_DESTDIR} == "no"
 _PKG_ARGS_PACKAGE+=    -p ${PREFIX}
 .else



Home | Main Index | Thread Index | Old Index