[csw-devel] SF.net SVN: gar:[7209] csw/mgar/gar/v2-migrateconf
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Tue Nov 10 17:13:10 CET 2009
Revision: 7209
http://gar.svn.sourceforge.net/gar/?rev=7209&view=rev
Author: dmichelsen
Date: 2009-11-10 16:13:05 +0000 (Tue, 10 Nov 2009)
Log Message:
-----------
mGAR v2-migrateconf: Add GAR support
Modified Paths:
--------------
csw/mgar/gar/v2-migrateconf/gar.mk
csw/mgar/gar/v2-migrateconf/gar.pkg.mk
Modified: csw/mgar/gar/v2-migrateconf/gar.mk
===================================================================
--- csw/mgar/gar/v2-migrateconf/gar.mk 2009-11-10 15:18:57 UTC (rev 7208)
+++ csw/mgar/gar/v2-migrateconf/gar.mk 2009-11-10 16:13:05 UTC (rev 7209)
@@ -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))
@@ -704,7 +706,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-migrateconf/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-migrateconf/gar.pkg.mk 2009-11-10 15:18:57 UTC (rev 7208)
+++ csw/mgar/gar/v2-migrateconf/gar.pkg.mk 2009-11-10 16:13:05 UTC (rev 7209)
@@ -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
@@ -374,7 +392,7 @@
$(foreach S,$(filter-out $*,$(SPKG_SPECS)),-X $(call licensedir,$S)/license) \
$(foreach FILE,$(_PKGFILES_INCLUDE),-i '$(FILE)') \
$(if $(_PKGFILES_INCLUDE),-x '.*',$(foreach FILE,$(_PKGFILES_EXCLUDE),-x '$(FILE)')) \
- $(foreach IE,$(abspath $(ISAEXEC_FILES_$*) $(ISAEXEC_FILES)), \
+ $(foreach IE,$(abspath $(ISAEXEC_FILES_$*) $(ISAEXEC_FILES)), \
-e '$(IE)=$(dir $(IE))$(ISA_DEFAULT)/$(notdir $(IE))' \
) \
<$(PROTOTYPE); \
@@ -563,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