pkgsrc-Users archive

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

Replacing PKG_SUFX with PKG_COMPRESSION



Greetings,

I would like once and for all :) fix the handling of PKG_COMPRESSION. At the 
moment, if only PKG_COMPRESSION has been set, PKG_SUFX always ends up being 
'.tgz'. If there is no objection, I would like to commit the following: [see 
diff below].

Kind regards,
Adam


diff -u -r1.21 package.mk
--- mk/flavor/pkg/package.mk    19 Mar 2011 09:45:24 -0000      1.21
+++ mk/flavor/pkg/package.mk    12 Apr 2011 07:09:26 -0000
@@ -1,16 +1,17 @@
 # $NetBSD: package.mk,v 1.21 2011/03/19 09:45:24 wiz 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
+PKG_COMPRESSION?=      gzip
+.if ${PKG_COMPRESSION} == "gzip"
+PKG_SUFX=              .tgz
+.elif ${PKG_COMPRESSION} == "bzip2"
+PKG_SUFX=              .tbz
+.elif ${PKG_COMPRESSION} == "none"
+PKG_SUFX=              .tar
+.elif ${PKG_COMPRESSION} == "xz"
+PKG_SUFX=              .txz
+.else
+WARNINGS+=             "Unsupported value for PKG_COMPRESSION"
 .endif
-PKG_SUFX?=             .tgz
 FILEBASE?=             ${PKGBASE}
 PKGFILE?=              ${PKGREPOSITORY}/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
 PKGREPOSITORY?=                ${PACKAGES}/${PKGREPOSITORYSUBDIR}


Home | Main Index | Thread Index | Old Index