[csw-devel] SF.net SVN: gar:[4932] csw/mgar/gar/v2
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Mon May 18 19:04:29 CEST 2009
Revision: 4932
http://gar.svn.sourceforge.net/gar/?rev=4932&view=rev
Author: dmichelsen
Date: 2009-05-18 17:04:29 +0000 (Mon, 18 May 2009)
Log Message:
-----------
mGAR v2: Source Packages
Modified Paths:
--------------
csw/mgar/gar/v2/gar.conf.mk
csw/mgar/gar/v2/gar.mk
csw/mgar/gar/v2/gar.pkg.mk
Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk 2009-05-18 16:29:23 UTC (rev 4931)
+++ csw/mgar/gar/v2/gar.conf.mk 2009-05-18 17:04:29 UTC (rev 4932)
@@ -108,7 +108,7 @@
includedir ?= $(prefix)/include
mandir ?= $(sharedstatedir)/man
docdir ?= $(sharedstatedir)/doc
-sourcedir ?= $(prefix)/src
+sourcedir ?= $(BUILD_PREFIX)/src
sharedperl ?= $(sharedstatedir)/perl
perllib ?= $(libdir)/perl
perlcswlib ?= $(perllib)/csw
@@ -572,6 +572,8 @@
TEST_ENV ?= $(foreach TTT,$(TEST_EXPORTS),$(TTT)="$($(TTT))")
INSTALL_ENV ?= $(foreach TTT,$(INSTALL_EXPORTS),$(TTT)="$($(TTT))")
+# For now don't build source packages until there is some more testing
+NOSOURCEPACKAGE ?= 1
# Standard Scripts
CONFIGURE_SCRIPTS ?= $(WORKSRC)/configure
Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk 2009-05-18 16:29:23 UTC (rev 4931)
+++ csw/mgar/gar/v2/gar.mk 2009-05-18 17:04:29 UTC (rev 4932)
@@ -598,7 +598,7 @@
_PAX_ARGS = $(_INC_EXT_RULE) $(EXTRA_PAX_ARGS)
# The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge $(addprefix merge-,$(MODULATIONS)) merge-license post-merge
+merge: checksum pre-merge $(addprefix merge-,$(MODULATIONS)) merge-license $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
@$(DONADA)
# This merges the
@@ -648,9 +648,10 @@
.PHONY: remerge reset-merge reset-merge-modulated
remerge: reset-merge merge
-reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license
+reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-src
@rm -f $(foreach M,$(MODULATIONS),$(COOKIEDIR)/merge-$M) $(COOKIEDIR)/merge
@rm -rf $(PKGROOT)
+ @$(DONADA)
reset-merge-modulated:
@$(call _pmod,Reset merge state)
Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk 2009-05-18 16:29:23 UTC (rev 4931)
+++ csw/mgar/gar/v2/gar.pkg.mk 2009-05-18 17:04:29 UTC (rev 4932)
@@ -31,8 +31,23 @@
else
SPKG_SPECS ?= $(sort $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES))
endif
-_PKG_SPECS = $(filter-out $(NOPACKAGE),$(SPKG_SPECS))
+# The is the name of the package containing the sourcefiles for all packages generated from this GAR recipe.
+# It defaults to the first defined package name or gspec. SRCPACKAGE_BASE is guaranteed
+# to be one of the real packages built.
+SRCPACKAGE_BASE = $(if $(PACKAGES),$(firstword $(PACKAGES)),$(firstword $(SPKG_SPECS)))
+
+SRCPACKAGE ?= $(SRCPACKAGE_BASE)-src
+CATALOGNAME_$(SRCPACKAGE) ?= $(patsubst CSW%,%,$(SRCPACKAGE_BASE))_src
+SPKG_DESC_$(SRCPACKAGE) ?= $(SPKG_DESC_$(SRCPACKAGE_BASE)) Source Package
+ARCHALL_$(SRCPACKAGE) ?= 1
+GARSYSTEMVERSION ?= $(shell $(SVN) propget svn:externals $(CURDIR) | perl -ane 'if($$F[0] eq "gar") { print ($$F[1]=~m(https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/(.*))),"\n";}')
+GARPKG_v1 = CSWgar-v1
+GARPKG_v2 = CSWgar-v2
+REQUIRED_PKGS_$(SRCPACKAGE) ?= $(or $(GARPKG_$(GARSYSTEMVERSION)),$(error GAR version $(GARSYSTEMVERSION) unknown))
+
+_PKG_SPECS = $(filter-out $(NOPACKAGE),$(SPKG_SPECS) $(if $(NOSOURCEPACKAGE),,$(SRCPACKAGE)))
+
# pkgname - Get the name of a package from a gspec-name or package-name
#
# This is a safety function. In sane settings it should return the name
@@ -59,17 +74,17 @@
#
define catalogname
$(strip
- $(if $(filter $(1),$(PACKAGES)),
- $(if $(CATALOGNAME_$(1)),
- $(CATALOGNAME_$(1)),
- $(if $(CATALOGNAME),
- $(CATALOGNAME),
- $(patsubst CSW%,%,$(1))
+ $(if $(CATALOGNAME_$(1)),
+ $(CATALOGNAME_$(1)),
+ $(if $(CATALOGNAME),
+ $(CATALOGNAME),
+ $(if $(filter $(1),$(PACKAGES)),
+ $(patsubst CSW%,%,$(1)),
+ $(if $(realpath files/$(1).gspec),
+ $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "bitname")' files/$(1).gspec),
+ $(error The catalog name for the package '$1' could not be determined, because it was neither in PACKAGES nor was there a gspec-file)
+ )
)
- ),
- $(if $(realpath files/$(1).gspec),
- $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "bitname")' files/$(1).gspec),
- $(error The catalog name for the package '$1' could not be determined, because it was neither in PACKAGES nor was there a gspec-file)
)
)
)
@@ -198,6 +213,11 @@
# PKGFILES_DOC selects files beloging to a documentation package
PKGFILES_DOC = $(docdir)/.*
+# PKGFILES_SRC selects the source archives for building the package
+PKGFILES_SRC = $(sourcedir)/$(call catalogname,$(SRCPACKAGE_BASE))/.*
+
+PKGFILES_$(SRCPACKAGE) ?= $(PKGFILES_SRC)
+
# This function computes the files to be excluded from the package specified
# as argument
define _pkgfiles_exclude
@@ -459,7 +479,19 @@
reset-merge-license:
@rm -f $(COOKIEDIR)/merge-license $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-license-$(SPEC))
+ @$(DONADA)
+
+merge-src: _SRCDIR=$(PKGROOT)$(sourcedir)/$(call catalogname,$(SRCPACKAGE_BASE))
+merge-src: fetch
+ @$(_DBG)mkdir -p $(_SRCDIR)
+ $(_DBG)(cd $(DOWNLOADDIR); pax -r -w -v $(foreach F,$(DISTFILES) $(PATCHFILES),$F) $(_SRCDIR))
+ @$(MAKECOOKIE)
+
+reset-merge-src:
+ @rm -f $(COOKIEDIR)/merge-src
+ @$(DONADA)
+
# package - Use the mkpackage utility to create Solaris packages
#
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