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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Nov 12 16:09:10 CET 2009


Revision: 7244
          http://gar.svn.sourceforge.net/gar/?rev=7244&view=rev
Author:   dmichelsen
Date:     2009-11-12 15:09:10 +0000 (Thu, 12 Nov 2009)

Log Message:
-----------
mGAR v2: Add support for inline-definitions of cswusergroup, cswinetdconf and cswetcservices

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

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2009-11-12 15:04:29 UTC (rev 7243)
+++ csw/mgar/gar/v2/gar.mk	2009-11-12 15:09:10 UTC (rev 7244)
@@ -710,7 +710,7 @@
 
 
 # The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge merge-do merge-license merge-migrateconf $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
+merge: checksum pre-merge merge-do merge-license merge-classutils $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
 	@$(DONADA)
 
 merge-do: $(if $(PARALLELMODULATIONS),merge-parallel,merge-sequential)
@@ -786,7 +786,7 @@
 .PHONY: remerge reset-merge reset-merge-modulated
 remerge: reset-merge merge
 
-reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-migrateconf reset-merge-src
+reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-classutils reset-merge-src
 	@rm -f $(COOKIEDIR)/pre-merge $(foreach M,$(MODULATIONS),$(COOKIEDIR)/merge-$M) $(COOKIEDIR)/merge $(COOKIEDIR)/post-merge
 	@rm -rf $(PKGROOT)
 	@$(DONADA)

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2009-11-12 15:04:29 UTC (rev 7243)
+++ csw/mgar/gar/v2/gar.pkg.mk	2009-11-12 15:09:10 UTC (rev 7244)
@@ -167,6 +167,15 @@
 
 MIGRATECONF ?= $(strip $(foreach S,$(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
+_USERGROUP_FILES ?= $(strip $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_usergroup),/etc/opt/csw/pkg/$S/cswusergroup)))
+_INETDCONF_FILES ?= $(strip $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_inetdconf),/etc/opt/csw/pkg/$S/inetd.conf)))
+_ETCSERVICES_FILES ?= $(strip $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_etcservices),/etc/opt/csw/pkg/$S/services)))
+
+USERGROUP += $(_USERGROUP_FILES)
+INETDCONF += $(_INETDCONF_FILES)
+ETCSERVICES += $(_ETCSERVICES_FILES)
+
 # NOTE: Order _can_  be important here.  cswinitsmf and cswinetd should
 #	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
@@ -580,6 +589,10 @@
 reset-merge-license:
 	@rm -f $(COOKIEDIR)/merge-license $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-license-$(SPEC))
 
+merge-classutils: merge-migrateconf merge-usergroup merge-inetdconf merge-etcservices
+
+reset-merge-classutils: reset-merge-migrateconf reset-merge-usergroup reset-merge-inetdconf reset-merge-etcservices
+
 merge-migrateconf: $(foreach S,$(SPKG_SPECS),$(if $(or $(MIGRATE_FILES_$S),$(MIGRATE_FILES)),merge-migrateconf-$S))
 	@$(MAKECOOKIE)
 
@@ -602,6 +615,43 @@
 reset-merge-migrateconf:
 	@rm -f $(COOKIEDIR)/merge-migrateconf $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-migrateconf-$(SPEC))
 
+_show_classutilvar//%:
+	$($*)
+
+merge-usergroup: $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_usergroup),merge-usergroup-$S))
+	@$(MAKECOOKIE)
+
+merge-usergroup-%:
+	@echo "[ Generating cswusergroup for package $* ]"
+	$(_DBG)ginstall -d $(PKGROOT)/etc/opt/csw/pkg/$*
+	$(_DBG)$(MAKE) --no-print-directory -n _show_classutilvar//$*_usergroup >$(PKGROOT)/etc/opt/csw/pkg/$*/cswusergroup
+	@$(MAKECOOKIE)
+
+reset-merge-usergroup:
+	@rm -f $(COOKIEDIR)/merge-usergroup $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-usergroup-$(SPEC))
+
+merge-inetdconf: $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_inetdconf),merge-inetdconf-$S))
+
+merge-inetdconf-%:
+	@echo "[ Generating inetd.conf for package $* ]"
+	$(_DBG)ginstall -d $(PKGROOT)/etc/opt/csw/pkg/$*
+	$(_DBG)$(MAKE) --no-print-directory -n _show_classutilvar//$*_inetdconf >$(PKGROOT)/etc/opt/csw/pkg/$*/inetd.conf
+	@$(MAKECOOKIE)
+
+reset-merge-inetdconf:
+	@rm -f $(COOKIEDIR)/merge-inetdconf $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-inetdconf-$(SPEC))
+
+merge-etcservices: $(foreach S,$(SPKG_SPECS),$(if $(value $(S)_etcservices),merge-etcservices-$S))
+
+merge-etcservices-%:
+	@echo "[ Generating services for package $* ]"
+	$(_DBG)ginstall -d $(PKGROOT)/etc/opt/csw/pkg/$*
+	$(_DBG)$(MAKE) --no-print-directory -n _show_classutilvar//$*_etcservices >$(PKGROOT)/etc/opt/csw/pkg/$*/services
+	@$(MAKECOOKIE)
+
+reset-merge-etcservices:
+	@rm -f $(COOKIEDIR)/merge-etcservices $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-etcservices-$(SPEC))
+
 merge-src: _SRCDIR=$(PKGROOT)$(sourcedir)/$(call catalogname,$(SRCPACKAGE_BASE))
 merge-src: fetch
 	$(_DBG)mkdir -p $(_SRCDIR)/files


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