[csw-devel] SF.net SVN: gar:[7212] csw/mgar/gar/v2

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Tue Nov 10 17:38:34 CET 2009


Revision: 7212
          http://gar.svn.sourceforge.net/gar/?rev=7212&view=rev
Author:   dmichelsen
Date:     2009-11-10 16:38:34 +0000 (Tue, 10 Nov 2009)

Log Message:
-----------
mGAR v2: Merge in cswmigrateconf support

Modified Paths:
--------------
    csw/mgar/gar/v2/gar.mk
    csw/mgar/gar/v2/gar.pkg.mk

Property Changed:
----------------
    csw/mgar/gar/v2/


Property changes on: csw/mgar/gar/v2
___________________________________________________________________
Modified: svn:mergeinfo
   - /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-skayser:6087-6132
   + /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-migrateconf:7082-7211
/csw/mgar/gar/v2-skayser:6087-6132

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2009-11-10 16:17:46 UTC (rev 7211)
+++ csw/mgar/gar/v2/gar.mk	2009-11-10 16:38:34 UTC (rev 7212)
@@ -46,14 +46,16 @@
 DISTNAME ?= $(GARNAME)-$(GARVERSION)
 
 DYNSCRIPTS = $(foreach PKG,$(SPKG_SPECS),$(foreach SCR,$(ADMSCRIPTS),$(if $(value $(PKG)_$(SCR)), $(PKG).$(SCR))))
-_NOCHECKSUM += $(DYNSCRIPTS) $(foreach R,$(GIT_REPOS),$(call GITPROJ,$(R)))
+_NOCHECKSUM += $(DYNSCRIPTS) $(foreach R,$(GIT_REPOS),$(call GITPROJ,$(R))) $(_EXTRA_GAR_NOCHECKSUM)
 
+DISTFILES += $(_EXTRA_GAR_DISTFILES)
+
 # Allow overriding of only specific components of ALLFILES by clearing e. g. 'ALLFILES_DYNSCRIPTS = '
 ALLFILES_DISTFILES ?= $(DISTFILES)
 ALLFILES_PATCHFILES ?= $(PATCHFILES) $(foreach M,$(MODULATIONS),$(PATCHFILES_$M))
 ALLFILES_DYNSCRIPTS ?= $(DYNSCRIPTS)
 ALLFILES_GIT_REPOS ?= $(foreach R,$(GIT_REPOS),$(call GITPROJ,$(R)))
-ALLFILES ?= $(sort $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) $(EXTRA_ALLFILES))
+ALLFILES ?= $(sort $(ALLFILES_DISTFILES) $(ALLFILES_PATCHFILES) $(ALLFILES_DYNSCRIPTS) $(ALLFILES_GIT_REPOS) $(EXTRA_ALLFILES) $(_EXTRA_GAR_ALLFILES))
 
 ifeq ($(MAKE_INSTALL_DIRS),1)
 INSTALL_DIRS = $(addprefix $(DESTDIR),$(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(libdir) $(infodir) $(lispdir) $(includedir) $(mandir) $(foreach NUM,1 2 3 4 5 6 7 8, $(mandir)/man$(NUM)) $(sourcedir))
@@ -708,7 +710,7 @@
 
 
 # The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge merge-do merge-license $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
+merge: checksum pre-merge merge-do merge-license merge-migrateconf $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
 	@$(DONADA)
 
 merge-do: $(if $(PARALLELMODULATIONS),merge-parallel,merge-sequential)

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2009-11-10 16:17:46 UTC (rev 7211)
+++ csw/mgar/gar/v2/gar.pkg.mk	2009-11-10 16:38:34 UTC (rev 7212)
@@ -159,6 +159,24 @@
 
 SPKG_PKGFILE ?= %{bitname}-%{SPKG_VERSION},%{SPKG_REVSTAMP}-%{SPKG_OSNAME}-%{arch}-$(or $(filter $(call _REVISION),UNCOMMITTED NOTVERSIONED NOSVN),CSW).pkg
 
+# Migration default
+ifneq ($(MIGRATE_FILES),)
+MIGRATECONF ?= /etc/opt/csw/pkg/$(call catalogname,$(firstword $(SPKG_SPECS)))/cswmigrateconf
+_EXTRA_GAR_DISTFILES += cswmigrateconf
+_EXTRA_GAR_NOCHECKSUM += cswmigrateconf
+
+$(DOWNLOADDIR)/cswmigrateconf:
+	@echo "[ Generating cswmigrateconf ]"
+	@(echo "MIGRATE_FILES=\"$(MIGRATE_FILES)\"";\
+		$(foreach F,$(MIGRATE_FILES),\
+			$(if $(MIGRATE_SOURCE_DIR_$F),echo "SOURCE_DIR_$(subst .,_,$F)=\"$(MIGRATE_SOURCE_DIR_$F)\"";)\
+			$(if $(MIGRATE_DEST_DIR_$F),echo "DEST_DIR_$(subst .,_,$F)=\"$(MIGRATE_DEST_DIR_$F)\"";)\
+		)\
+	) >$@
+
+
+endif
+
 # Handle cswclassutils
 # append $2 to SPKG_CLASSES if $1 is non-null
 define _spkg_cond_add
@@ -169,6 +187,7 @@
 #	always be the last two added.  The reason for this is that
 #	you need to ensure any binaries and config files are already on disk
 #	and able to be consumed by a service that might be started.
+SPKG_CLASSES := $(call _spkg_cond_add,MIGRATECONF,cswmigrateconf)
 SPKG_CLASSES := $(call _spkg_cond_add,SAMPLECONF,cswcpsampleconf)
 SPKG_CLASSES := $(call _spkg_cond_add,PRESERVECONF,cswpreserveconf)
 SPKG_CLASSES := $(call _spkg_cond_add,ETCSERVICES,cswetcservices)
@@ -178,8 +197,9 @@
 SPKG_CLASSES := $(call _spkg_cond_add,INITSMF,cswinitsmf)
 
 # - set class for all config files
-ifneq ($(SAMPLECONF)$(PRESERVECONF)$(ETCSERVICES)$(INETDCONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE),)
+ifneq ($(SAMPLECONF)$(PRESERVECONF)$(MIGRATECONF)$(ETCSERVICES)$(INETDCONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE),)
 _CSWCLASS_FILTER = | perl -ane '\
+		$(foreach FILE,$(MIGRATECONF),$$F[1] = "cswmigrateconf" if( $$F[2] =~ m(^$(FILE)$$) );)\
 		$(foreach FILE,$(SAMPLECONF:%\.CSW=%),$$F[1] = "cswcpsampleconf" if ( $$F[2] =~ m(^$(FILE)\.CSW$$) );)\
 		$(foreach FILE,$(PRESERVECONF:%\.CSW=%),$$F[1] = "cswpreserveconf" if( $$F[2] =~ m(^$(FILE)\.CSW$$) );)\
 		$(foreach FILE,$(ETCSERVICES),$$F[1] = "cswetcservices" if( $$F[2] =~ m(^$(FILE)$$) );)\
@@ -561,6 +581,12 @@
 	@rm -f $(COOKIEDIR)/merge-license $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-license-$(SPEC))
 	@$(DONADA)
 
+merge-migrateconf: $(WORKDIR)
+	$(if $(MIGRATECONF),\
+		ginstall -d $(PKGROOT)$(dir $(MIGRATECONF));\
+		ginstall $(DOWNLOADDIR)/cswmigrateconf $(PKGROOT)$(MIGRATECONF)\
+	)
+	@$(MAKECOOKIE)
 
 merge-src: _SRCDIR=$(PKGROOT)$(sourcedir)/$(call catalogname,$(SRCPACKAGE_BASE))
 merge-src: fetch


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