1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 4936

Show
Ignore:
Timestamp:
05/18/09 17:41:02 (4 years ago)
Author:
dmichelsen
Message:

mGAR v2: Fixes for source packages

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • csw/mgar/gar/v2/gar.pkg.mk

    r4932 r4936  
    2626# If no explicit gspec-files have been defined the default name for the package is CSW$(GARNAME). 
    2727# The whole processing is done from _PKG_SPECS, which includes all packages to be build. 
     28 
     29# SRCPACKAGE_BASE is the name of the package containing the sourcefiles for all packages 
     30# generated from this GAR recipe. It defaults to the first defined package name or gspec. 
     31# SRCPACKAGE is the name of the package containing the sources 
     32 
    2833ifeq ($(origin PACKAGES), undefined) 
    2934PACKAGES        = $(if $(filter %.gspec,$(DISTFILES)),,CSW$(GARNAME)) 
    30 SPKG_SPECS     ?= $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES) 
     35SRCPACKAGE_BASE = $(firstword $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES)) 
     36SRCPACKAGE     ?= $(SRCPACKAGE_BASE)-src 
     37SPKG_SPECS     ?= $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES) $(SRCPACKAGE) 
    3138else 
    32 SPKG_SPECS     ?= $(sort $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES)) 
    33 endif 
     39SRCPACKAGE_BASE = $(firstword $(PACKAGES)) 
     40SRCPACKAGE     ?= $(SRCPACKAGE_BASE)-src 
     41SPKG_SPECS     ?= $(sort $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES) $(SRCPACKAGE)) 
     42endif 
     43 
     44# Automatic definitions for source package 
     45CATALOGNAME_$(SRCPACKAGE)   ?= $(patsubst CSW%,%,$(SRCPACKAGE_BASE))_src 
     46SPKG_DESC_$(SRCPACKAGE)     ?= $(SPKG_DESC_$(SRCPACKAGE_BASE)) Source Package 
     47ARCHALL_$(SRCPACKAGE)       ?= 1 
     48# XXX: Use Repository Root instead of fixed URL as base 
     49GARSYSTEMVERSION ?= $(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";}') 
     50GARPKG_v1 = CSWgar-v1 
     51GARPKG_v2 = CSWgar-v2 
     52REQUIRED_PKGS_$(SRCPACKAGE) ?= $(or $(GARPKG_$(GARSYSTEMVERSION)),$(error GAR version $(GARSYSTEMVERSION) unknown)) 
     53 
     54_PKG_SPECS      = $(filter-out $(NOPACKAGE),$(SPKG_SPECS)) 
    3455 
    3556# The is the name of the package containing the sourcefiles for all packages generated from this GAR recipe. 
     
    485506merge-src: _SRCDIR=$(PKGROOT)$(sourcedir)/$(call catalogname,$(SRCPACKAGE_BASE)) 
    486507merge-src: fetch 
    487         @$(_DBG)mkdir -p $(_SRCDIR) 
    488         $(_DBG)(cd $(DOWNLOADDIR); pax -r -w -v $(foreach F,$(DISTFILES) $(PATCHFILES),$F) $(_SRCDIR)) 
     508        $(_DBG)mkdir -p $(_SRCDIR)/files 
     509        $(_DBG)(cd $(DOWNLOADDIR); pax -rH -w -v $(foreach F,$(DISTFILES) $(PATCHFILES),$F) $(_SRCDIR)/files) 
     510        $(_DBG)(cd $(CURDIR); pax -rH -w -v Makefile checksums $(_SRCDIR)) 
     511        $(_DBG)ln -s ../gar/$(GARSYSTEMVERSION) $(_SRCDIR)/gar 
    489512        @$(MAKECOOKIE) 
    490513 
     
    492515        @rm -f $(COOKIEDIR)/merge-src 
    493516        @$(DONADA) 
     517 
    494518 
    495519# package - Use the mkpackage utility to create Solaris packages