[csw-devel] SF.net SVN: gar:[19819] csw/mgar/gar/v2/gar.pkg.mk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Wed Dec 5 16:05:28 CET 2012
Revision: 19819
http://gar.svn.sourceforge.net/gar/?rev=19819&view=rev
Author: dmichelsen
Date: 2012-12-05 15:05:25 +0000 (Wed, 05 Dec 2012)
Log Message:
-----------
mGAR v2: Put filename statically in gspec
Modified Paths:
--------------
csw/mgar/gar/v2/gar.pkg.mk
Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk 2012-12-05 13:50:13 UTC (rev 19818)
+++ csw/mgar/gar/v2/gar.pkg.mk 2012-12-05 15:05:25 UTC (rev 19819)
@@ -216,8 +216,16 @@
SPKG_DEPEND_DB = $(GARDIR)/csw/depend.db
-SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION},%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg
+# This is the old specification being evaluated during mkpackage. The expansion of the SPKG_REVSTAMP leads to
+# problems later on when need the filename for checkpkg again and too much time has passed. In the new approach
+# the packagename is directly put in the gspec.
+# SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION},%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg
+# The filename for a package
+define _pkgfile
+$(call catalogname,$(1))-$(call pkgvar,SPKG_VERSION,$(1)),$(call pkgvar,SPKG_REVSTAMP,$(1))-$(call pkgvar,SPKG_OSNAME,$(1))-$(if $(or $(ARCHALL),$(ARCHALL_$(1))),all,$(GARCH))-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg
+endef
+
MIGRATECONF ?= $(strip $(foreach S,$(filter-out $(OBSOLETED_PKGS),$(SPKG_SPECS)),$(if $(or $(MIGRATE_FILES_$S),$(MIGRATE_FILES)),/etc/opt/csw/pkg/$S/cswmigrateconf)))
# It is NOT sufficient to change the pathes here, they must be adjusted in merge-* also
@@ -314,6 +322,7 @@
# Where we find our mkpackage global templates
PKGLIB = $(GARDIR)/pkglib
+# These variables are for mkpackage and the gspec expansion
PKG_EXPORTS = NAME VERSION DESCRIPTION CATEGORIES GARCH GARDIR GARBIN
PKG_EXPORTS += CURDIR WORKDIR WORKDIR_FIRSTMOD WORKSRC WORKSRC_FIRSTMOD PKGROOT
PKG_EXPORTS += SPKG_REVSTAMP SPKG_PKGNAME SPKG_DESC SPKG_VERSION SPKG_CATEGORY
@@ -596,6 +605,7 @@
$(_DBG)$(if $(filter $*.gspec,$(DISTFILES)),,\
(echo "%var bitname $(call catalogname,$*)"; \
echo "%var pkgname $*"; \
+ echo "%var pkgfile $(call _pkgfile,$*)"; \
$(if $(or $(ARCHALL),$(ARCHALL_$*)),echo "%var arch all";) \
$(if $(_CATEGORY_GSPEC_INCLUDE),echo "%include url file://%{PKGLIB}/$(_CATEGORY_GSPEC_INCLUDE)")) >$@\
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list