[csw-devel] SF.net SVN: gar:[7337] csw/mgar/gar/v2-git
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Nov 18 09:57:58 CET 2009
Revision: 7337
http://gar.svn.sourceforge.net/gar/?rev=7337&view=rev
Author: wahwah
Date: 2009-11-18 08:57:57 +0000 (Wed, 18 Nov 2009)
Log Message:
-----------
gar-v2-git: merging changes from v2
Modified Paths:
--------------
csw/mgar/gar/v2-git/bin/checkpkg
csw/mgar/gar/v2-git/bin/gitproxy
csw/mgar/gar/v2-git/bin/update-commondirs
csw/mgar/gar/v2-git/categories/cpan/category.mk
csw/mgar/gar/v2-git/categories/x11/category.mk
csw/mgar/gar/v2-git/category.mk
csw/mgar/gar/v2-git/etc/commondirs-i386
csw/mgar/gar/v2-git/etc/commondirs-sparc
csw/mgar/gar/v2-git/gar.conf.mk
csw/mgar/gar/v2-git/gar.lib.mk
csw/mgar/gar/v2-git/gar.mk
csw/mgar/gar/v2-git/gar.pkg.mk
csw/mgar/gar/v2-git/pkglib/csw/depend.perl
csw/mgar/gar/v2-git/pkglib/csw_cpan.gspec
csw/mgar/gar/v2-git/pkglib/csw_dyngspec.gspec
Added Paths:
-----------
csw/mgar/gar/v2-git/categories/loose/
csw/mgar/gar/v2-git/categories/loose/category.mk
csw/mgar/gar/v2-git/pkglib/csw_cpan_dyngspec.gspec
Removed Paths:
-------------
csw/mgar/gar/v2-git/categories/loose/category.mk
Property Changed:
----------------
csw/mgar/gar/v2-git/
Property changes on: csw/mgar/gar/v2-git
___________________________________________________________________
Modified: svn:mergeinfo
- /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-skayser:6087-6132
+ /csw/mgar/gar/v2:4936-6678,6916-7336
/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-git/bin/checkpkg
===================================================================
--- csw/mgar/gar/v2-git/bin/checkpkg 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/bin/checkpkg 2009-11-18 08:57:57 UTC (rev 7337)
@@ -97,7 +97,10 @@
# Need to rewrite this whole thing to also
# check for badly set RUNPATHs. sigh.
#
- for badpath in /export/medusa /opt/build ; do
+ # Using rot13 so that checkpkg can check itself without reporting
+ # an error.
+ badpaths="$(echo /rkcbeg/zrqhfn /bcg/ohvyq | gtr a-mn-z n-za-m)"
+ for badpath in $badpaths ; do
GREP=/bin/grep gzgrep "$badpath" $f
if [[ $? -eq 0 ]] ; then
print ""
@@ -440,6 +443,15 @@
exit 1
fi
+# Verify that there are no double depends
+repeated_depends="$(awk '{print $2}' $EXTRACTDIR/$pkgname/install/depend \
+ | sort | uniq -c | awk '{print $1}' | sort | uniq | wc -l)"
+if [[ "$repeated_depends" -gt 1 ]]; then
+ cat $EXTRACTDIR/$pkgname/install/depend
+ print ERROR: $pkgname has double depends
+ exit 1
+fi
+
#to retain a record of all packages currently being examined from $@
echo $pkgname >> $SETDEPS
@@ -451,7 +463,7 @@
if [[ $? -ne 0 ]]; then
#if we've already looked at the package named $dep,
#it'll be in the file.
- awk "\$1 == \"$dep\" {print}" $SETDEPS | /usr/xpg4/bin/grep -q $dep
+ awk "\$1 == \"$dep\" {print}" $SETDEPS | /usr/bin/grep $dep >/dev/null
if [[ $? -ne 0 ]]; then #we haven't yet seen this package in our set
echo "Can't validate dependence on $dep. Storing for delayed validation."
#store for validation at the end.
@@ -530,7 +542,7 @@
while read mdep; do
dep=`echo $mdep | nawk '{print $1}'`
pkg=`echo $mdep | nawk '{print $2}'`
- /usr/xpg4/bin/grep -q $dep $SETDEPS
+ /usr/bin/grep $dep $SETDEPS >/dev/null
if [ $? -ne 0 ]; then
errmsg "Couldn't validate $dep as a dependency in package $pkg"
else
@@ -545,7 +557,7 @@
lib=`echo $ldep | nawk '{print $1}'`
[ "$lib" = "libm.so.2" ] && continue
pkg=`echo $ldep | nawk '{print $2}'`
- /usr/xpg4/bin/grep -q "[/=]$lib[ =]" $SETLIBS
+ /usr/bin/grep "[/=]$lib[ =]" $SETLIBS >/dev/null
if [ $? -ne 0 ]; then
errmsg "Couldn't find a package providing $lib"
else
Modified: csw/mgar/gar/v2-git/bin/gitproxy
===================================================================
--- csw/mgar/gar/v2-git/bin/gitproxy 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/bin/gitproxy 2009-11-18 08:57:57 UTC (rev 7337)
@@ -15,6 +15,6 @@
nc ${PROXYHOST} ${PROXYPORT} | (read a; read a; cat )
else
- echo Please set http_proxy in your environment.
+ echo Please set http_proxy in your environment. >&2
exit 1
fi
Modified: csw/mgar/gar/v2-git/bin/update-commondirs
===================================================================
--- csw/mgar/gar/v2-git/bin/update-commondirs 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/bin/update-commondirs 2009-11-18 08:57:57 UTC (rev 7337)
@@ -19,17 +19,17 @@
mkdir $TMPDIR
(
cd $TMPDIR
- wget http://mirror.opencsw.org/opencsw/current/$1/5.8/common-1.4.6,REV=2008.04.28-SunOS5.8-$1-CSW.pkg.gz
- gzip -c -d common-* | pkgtrans /dev/fd/0 $TMPDIR all
+ wget http://mirror.opencsw.org/opencsw/current/$1/5.8/common-1.4.7,REV=2009.09.20-SunOS5.8-$1-CSW.pkg
+ cat common-* | pkgtrans /dev/fd/0 $TMPDIR all
)
- perl -ne '
+ ( perl -ne '
my @l = split;
if( $l[1] =~ /^[ds]$/ ) {
print ($l[3] =~ /([^=]*)/);
print "\n";
}
- ' $TMPDIR/CSWcommon/pkgmap > ../etc/commondirs-$1
+ ' $TMPDIR/CSWcommon/pkgmap; echo "/var"; echo "/var/run") > ../etc/commondirs-$1
rm -rf $TMPDIR
}
Modified: csw/mgar/gar/v2-git/categories/cpan/category.mk
===================================================================
--- csw/mgar/gar/v2-git/categories/cpan/category.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/categories/cpan/category.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -34,7 +34,7 @@
SPKG_SOURCEURL := $(SPKG_SOURCEURL)/$(GARNAME)
_MERGE_EXCLUDE_CATEGORY = .*/perllocal\.pod .*/\.packlist
-_CATEGORY_GSPEC_INCLUDE ?= csw_cpan.gspec
+_CATEGORY_GSPEC_INCLUDE ?= csw_cpan_dyngspec.gspec
include gar/gar.mk
Deleted: csw/mgar/gar/v2-git/categories/loose/category.mk
===================================================================
--- csw/mgar/gar/v2/categories/loose/category.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/categories/loose/category.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,28 +0,0 @@
-# $Id$
-#
-# Building packages from loose files, laid out in a directory.
-
-CONFIGURE_SCRIPTS =
-BUILD_SCRIPTS =
-INSTALL_SCRIPTS = loose
-TEST_SCRIPTS =
-
-MASTER_SITES += $(sort $(addprefix file://$(LOCAL_SRC)/,$(dir $(FILES))))
-DISTFILES += $(notdir $(FILES))
-
-include gar/gar.mk
-
-ifndef LOCAL_SRC
-$(error "Please set the LOCAL_SRC variable to the root of your source code tree")
-endif
-
-ifndef FILES
-$(error "Please set the FILES variable to the list of files to include")
-endif
-
-install-loose:
- $(foreach F,$(FILES),ginstall \
- -d $(DESTDIR)$(prefix)/$(dir $F) \
- && ginstall $(WORKDIR)/$(notdir $F) \
- $(DESTDIR)$(prefix)/$(dir $F);)
- @$(MAKECOOKIE)
Copied: csw/mgar/gar/v2-git/categories/loose/category.mk (from rev 7336, csw/mgar/gar/v2/categories/loose/category.mk)
===================================================================
--- csw/mgar/gar/v2-git/categories/loose/category.mk (rev 0)
+++ csw/mgar/gar/v2-git/categories/loose/category.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -0,0 +1,28 @@
+# $Id$
+#
+# Building packages from loose files, laid out in a directory.
+
+CONFIGURE_SCRIPTS =
+BUILD_SCRIPTS =
+INSTALL_SCRIPTS = loose
+TEST_SCRIPTS =
+
+MASTER_SITES += $(sort $(addprefix file://$(LOCAL_SRC)/,$(dir $(FILES))))
+DISTFILES += $(notdir $(FILES))
+
+include gar/gar.mk
+
+ifndef LOCAL_SRC
+$(error "Please set the LOCAL_SRC variable to the root of your source code tree")
+endif
+
+ifndef FILES
+$(error "Please set the FILES variable to the list of files to include")
+endif
+
+install-loose:
+ $(foreach F,$(FILES),ginstall \
+ -d $(DESTDIR)$(prefix)/$(dir $F) \
+ && ginstall $(WORKDIR)/$(notdir $F) \
+ $(DESTDIR)$(prefix)/$(dir $F);)
+ @$(MAKECOOKIE)
Modified: csw/mgar/gar/v2-git/categories/x11/category.mk
===================================================================
--- csw/mgar/gar/v2-git/categories/x11/category.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/categories/x11/category.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,6 +1,11 @@
# X11
-X11_PROTO_MASTER_SITE = http://xorg.freedesktop.org/releases/individual/proto/
-X11_LIB_MASTER_SITE = http://xorg.freedesktop.org/releases/individual/lib/
+
+# Version of X11
+X11_RELEASE_VERSION = X11R7.4
+
+# Definition of the URL to access sources
+X11_PROTO_MASTER_SITE = http://xorg.freedesktop.org/releases/$(X11_RELEASE_VERSION)/src/proto/
+X11_LIB_MASTER_SITE = http://xorg.freedesktop.org/releases/$(X11_RELEASE_VERSION)/src/lib/
XCB_MASTER_SITES = http://xcb.freedesktop.org/dist/
# C and C++ compiler flags
Modified: csw/mgar/gar/v2-git/category.mk
===================================================================
--- csw/mgar/gar/v2-git/category.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/category.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -2,8 +2,8 @@
# This makefile is to be included from Makefiles in each category
# directory.
-ifeq (,$(CATEGORIES))
- $(error Please set CATEGORIES to one of $(wildcard categories/*))
+ifeq (,$(wildcard gar/categories/$(CATEGORIES)/category.mk))
+ $(error The category '$(CATEGORIES)' is invalid. Valid categories are $(patsubst gar/categories/%,%,$(wildcard gar/categories/*)))
endif
include gar/categories/$(CATEGORIES)/category.mk
Modified: csw/mgar/gar/v2-git/etc/commondirs-i386
===================================================================
--- csw/mgar/gar/v2-git/etc/commondirs-i386 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/etc/commondirs-i386 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,4 +1,17 @@
/etc/opt/csw
+/etc/opt/csw/pkg-hooks
+/etc/opt/csw/pkg-hooks/postbatchinstall.d
+/etc/opt/csw/pkg-hooks/postbatchremove.d
+/etc/opt/csw/pkg-hooks/postbatchupgrade.d
+/etc/opt/csw/pkg-hooks/postinstall.d
+/etc/opt/csw/pkg-hooks/postremove.d
+/etc/opt/csw/pkg-hooks/postupgrade.d
+/etc/opt/csw/pkg-hooks/prebatchinstall.d
+/etc/opt/csw/pkg-hooks/prebatchremove.d
+/etc/opt/csw/pkg-hooks/prebatchupgrade.d
+/etc/opt/csw/pkg-hooks/preinstall.d
+/etc/opt/csw/pkg-hooks/preremove.d
+/etc/opt/csw/pkg-hooks/preupgrade.d
/opt/csw
/opt/csw/bin
/opt/csw/bin/amd64
@@ -140,3 +153,6 @@
/opt/csw/share/man
/opt/csw/var
/var/opt/csw
+/var/opt/csw/pkg-hooks
+/var
+/var/run
Modified: csw/mgar/gar/v2-git/etc/commondirs-sparc
===================================================================
--- csw/mgar/gar/v2-git/etc/commondirs-sparc 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/etc/commondirs-sparc 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,4 +1,17 @@
/etc/opt/csw
+/etc/opt/csw/pkg-hooks
+/etc/opt/csw/pkg-hooks/postbatchinstall.d
+/etc/opt/csw/pkg-hooks/postbatchremove.d
+/etc/opt/csw/pkg-hooks/postbatchupgrade.d
+/etc/opt/csw/pkg-hooks/postinstall.d
+/etc/opt/csw/pkg-hooks/postremove.d
+/etc/opt/csw/pkg-hooks/postupgrade.d
+/etc/opt/csw/pkg-hooks/prebatchinstall.d
+/etc/opt/csw/pkg-hooks/prebatchremove.d
+/etc/opt/csw/pkg-hooks/prebatchupgrade.d
+/etc/opt/csw/pkg-hooks/preinstall.d
+/etc/opt/csw/pkg-hooks/preremove.d
+/etc/opt/csw/pkg-hooks/preupgrade.d
/opt/csw
/opt/csw/bin
/opt/csw/bin/sparc
@@ -144,3 +157,6 @@
/opt/csw/share/man
/opt/csw/var
/var/opt/csw
+/var/opt/csw/pkg-hooks
+/var
+/var/run
Modified: csw/mgar/gar/v2-git/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2-git/gar.conf.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/gar.conf.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -164,6 +164,8 @@
DESTIMG ?= $(LOGNAME)-$(shell hostname)
+# A default list of packages that everyone will depend on
+COMMON_PKG_DEPENDS ?= CSWcommon
# These are the core packages which must be installed for GAR to function correctly
DEF_BASE_PKGS = CSWgmake CSWgtar CSWggrep CSWdiffutils CSWgfile CSWtextutils CSWwget CSWfindutils CSWgsed CSWgawk CSWbzip2
@@ -203,8 +205,8 @@
ARCHFLAGS_SOS11_sparcv9+vis = -xarch=v9a
ARCHFLAGS_SOS12_sparcv9+vis = -m64 -xarch=sparcvis
- ARCHFLAGS_GCC3_sparcv9+vis = -m64 -mcpu=v9 -mvis
- ARCHFLAGS_GCC4_sparcv9+vis = -m64 -mcpu=v9 -mvis
+ ARCHFLAGS_GCC3_sparcv9+vis = -m64 -mcpu=ultrasparc -mvis
+ ARCHFLAGS_GCC4_sparcv9+vis = -m64 -mcpu=ultrasparc -mvis
MEMORYMODEL_sparcv9+vis = 64
ARCHFLAGS_SOS11_sparcv9 = -xarch=v9
@@ -492,7 +494,7 @@
RUNPATH_LINKER_FLAGS ?= $(foreach D,$(RUNPATH_DIRS),$(addprefix -R,$(addsuffix /\$$ISALIST,$(filter $D,$(RUNPATH_ISALIST))) $(abspath $D/$(MM_LIBDIR)))) $(addprefix -R,$(filter-out $(RUNPATH_DIRS),$(RUNPATH_ISALIST))) $(EXTRA_RUNPATH_LINKER_FLAGS)
endif
-LINKER_FLAGS ?= $(foreach ELIB,$(libdir_install) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS)
+LINKER_FLAGS ?= $(foreach ELIB,$(libpath_install) $(filter-out $(libpath_install),$(libdir_install)) $(EXTRA_LIB),-L$(abspath $(ELIB)/$(MM_LIBDIR))) $(EXTRA_LINKER_FLAGS)
CC_HOME = $($(GARCOMPILER)_CC_HOME)
CC = $($(GARCOMPILER)_CC)
Modified: csw/mgar/gar/v2-git/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2-git/gar.lib.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/gar.lib.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -498,6 +498,12 @@
@( cd $* ; $(CONFIGURE_ENV) ruby ./setup.rb config $(CONFIGURE_ARGS) )
@$(MAKECOOKIE)
+# WAF build, for details see http://code.google.com/p/waf/
+configure-%/waf:
+ @echo " ==> Running waf configure in $*"
+ cd $* && $(CONFIGURE_ENV) ./waf configure $(CONFIGURE_ARGS)
+ @$(MAKECOOKIE)
+
#################### BUILD RULES ####################
# build from a standard gnu-style makefile's default rule.
@@ -537,6 +543,12 @@
@( cd $* ; $(BUILD_ENV) ruby ./setup.rb setup $(BUILD_ARGS) )
@$(MAKECOOKIE)
+# WAF build, for details see http://code.google.com/p/waf/
+build-%/waf:
+ @echo " ==> Running waf build in $*"
+ @$(cd $* ; (BUILD_ENV) ./waf build $(BUILD_ARGS) )
+ @$(MAKECOOKIE)
+
# This can be: build, build_py, build_ext, build_clib, build_scripts
# See setup.py --help-commands for details
PYBUILD_CMD ?= build
@@ -615,6 +627,12 @@
@( cd $* ; $(INSTALL_ENV) ruby ./setup.rb install --prefix=$(DESTDIR) )
@$(MAKECOOKIE)
+# WAF build, for details see http://code.google.com/p/waf/
+install-%/waf:
+ @echo " ==> Running waf install in $*"
+ @$(cd $* ; (INSTALL_ENV) ./waf install $(INSTALL_ARGS) )
+ @$(MAKECOOKIE)
+
# This can be: install, install_lib, install_headers, install_scripts,
# or install_data. See setup.py --help-commands for details.
PYINSTALL_CMD ?= install
Modified: csw/mgar/gar/v2-git/gar.mk
===================================================================
--- csw/mgar/gar/v2-git/gar.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/gar.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -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))
@@ -191,6 +193,48 @@
$(eval $(call _modulate,$(MODULATORS)))
+# --- This next block allows you to use collapsed ISAs in modulations
+# isa-default-... instead of isa-sparcv8-... and isa-i386-...
+# isa-default64-... instead of isa-sparcv9-... and isa-amd64-...
+# isa-extra-... instead of any other ISA (if default64 is undefined it falls back to 'extra')
+
+__collapsedisa = $(strip $(or $(and $(filter $(ISA_DEFAULT_sparc) $(ISA_DEFAULT_i386),$(1)),default),\
+ $(and $(filter $(ISA_DEFAULT64_sparc) $(ISA_DEFAULT64_i386),$(1)),default64),\
+ extra))
+
+__collapsedisa64 = default64
+__collapsedisaextra = extra
+
+__isacollapsedmodulation_1 = $(call tolower,$(1))-$(if $(filter ISA,$(1)),$(call $(2),$(ISA)),$($(1)))
+__isacollapsedmodulation = $(if $(word 2,$(1)),\
+ $(foreach P,$(call __isacollapsedmodulation_1,$(firstword $(1)),$(2)),\
+ $(addprefix $(P)-,$(call __isacollapsedmodulation,$(wordlist 2,$(words $(1)),$(1))))\
+ ),\
+ $(call __isacollapsedmodulation_1,$(1),$(2)))
+
+# This is the name of the current modulation but with the ISA i386, sparcv8 and amd64, sparcv9 replaced
+# with the collapsed name 'default', 'default64' and everything else as 'extra'.
+MODULATION_ISACOLLAPSED = $(strip $(call __isacollapsedmodulation,$(strip $(MODULATORS)),__collapsedisa))
+
+# This is the name of the current modulation but with the ISA replaced with 'default64'
+MODULATION_ISACOLLAPSED64 = $(strip $(call __isacollapsedmodulation,$(strip $(MODULATORS)),__collapsedisa64))
+
+# This is the name of the current modulation but with the ISA replaced with 'extra'
+MODULATION_ISACOLLAPSEDEXTRA = $(strip $(call __isacollapsedmodulation,$(strip $(MODULATORS)),__collapsedisaextra))
+
+# $(warning Mod: $(MODULATION) ISA: $(ISA) coll: $(MODULATION_ISACOLLAPSED) 64: $(MODULATION_ISACOLLAPSED64) extra: $(MODULATION_ISACOLLAPSEDEXTRA))
+
+# Call this function to get either the modulation-specific value or the default.
+# Instead of $(myvar_$(MODULATION)) $(call modulationvalue,myvar)
+define modulationvalue
+$(strip $(or $($(1)_$(MODULATION)),\
+ $($(1)_$(call __isacollapsedmodulation,$(strip $(MODULATORS)),__collapsedisa)),\
+ $($(1)_$(call __isacollapsedmodulation,$(strip $(MODULATORS)),__collapsedisaextra))\
+))
+endef
+
+# --- end of collapsed ISA modulations
+
#################### DIRECTORY MAKERS ####################
# This is to make dirs as needed by the base rules
@@ -590,10 +634,15 @@
MERGE_SCRIPTS_isa-$(ISA_DEFAULT) ?= copy-all $(EXTRA_MERGE_SCRIPTS_$(ISA_DEFAULT)) $(EXTRA_MERGE_SCRIPTS)
else
ISAEXEC_DIRS ?= $(if $(NO_ISAEXEC),,$(bindir) $(sbindir) $(libexecdir))
-MERGE_DIRS_isa-$(ISA_DEFAULT) ?= $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA_DEFAULT))
-MERGE_DIRS_isa-$(ISA) ?= $(bindir) $(sbindir) $(libexecdir) $(libdir) $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA))
-MERGE_SCRIPTS_isa-$(ISA_DEFAULT) ?= copy-relocate $(EXTRA_MERGE_SCRIPTS_isa-$(ISA_DEFAULT)) $(EXTRA_MERGE_SCRIPTS)
-MERGE_SCRIPTS_isa-$(ISA) ?= copy-relocated-only $(EXTRA_MERGE_SCRIPTS_isa-$(ISA)) $(EXTRA_MERGE_SCRIPTS)
+MERGE_DIRS_isa-default ?= $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA_DEFAULT))
+MERGE_DIRS_isa-extra ?= $(bindir) $(sbindir) $(libexecdir) $(libdir) $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA))
+MERGE_DIRS_$(MODULATION_ISACOLLAPSED64) ?= $(MERGE_DIRS_$(MODULATION_ISACOLLAPSEDEXTRA))
+MERGE_DIRS_$(MODULATION) ?= $(MERGE_DIRS_$(MODULATION_ISACOLLAPSED))
+
+MERGE_SCRIPTS_isa-default ?= copy-relocate $(EXTRA_MERGE_SCRIPTS_isa-$(ISA_DEFAULT)) $(EXTRA_MERGE_SCRIPTS)
+MERGE_SCRIPTS_isa-extra ?= copy-relocated-only $(EXTRA_MERGE_SCRIPTS_isa-$(ISA)) $(EXTRA_MERGE_SCRIPTS)
+MERGE_SCRIPTS_$(MODULATION_ISACOLLAPSED64) ?= $(MERGE_SCRIPTS_$(MODULATION_ISACOLLAPSEDEXTRA))
+MERGE_SCRIPTS_$(MODULATION) ?= $(MERGE_SCRIPTS_$(MODULATION_ISACOLLAPSED))
endif
# These directories get relocated into their ISA subdirectories
@@ -609,6 +658,10 @@
if test -f "$$F" -a \! -h "$$F"; then echo $$F; fi; \
done)),)
+ifneq ($(COMMON_PKG_DEPENDS),)
+_EXTRA_GAR_PKGS += $(COMMON_PKG_DEPENDS)
+endif
+
ifneq ($(ISAEXEC_FILES),)
_EXTRA_GAR_PKGS += CSWisaexec
endif
@@ -694,7 +747,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-classutils $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
@$(DONADA)
merge-do: $(if $(PARALLELMODULATIONS),merge-parallel,merge-sequential)
@@ -718,7 +771,7 @@
merge-watch: _USEMULTITAIL=$(shell test -x $(MULTITAIL) && test -x $(TTY) && $(TTY) >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo yes; fi)
merge-watch: $(addprefix $(WORKROOTDIR)/build-,global $(MODULATIONS))
$(_DBG_MERGE)$(if $(_USEMULTITAIL),\
- $(MULTITAIL) --retry-all $(foreach M,$(MODULATIONS),$(WORKROOTDIR)/build-$M/build.log) -j & echo $$! > $(WORKROOTDIR)/build-global/multitail.pid,\
+ $(MULTITAIL) --retry-all $(foreach M,$(MODULATIONS),$(WORKROOTDIR)/build-$M/build.log) -t "build(s) in progress" -wh 1 -j & echo $$! > $(WORKROOTDIR)/build-global/multitail.pid,\
echo "Building all ISAs in parallel. Please see the individual logfiles for details:";$(foreach M,$(MODULATIONS),echo "- $(WORKROOTDIR)/build-$M/build.log";)\
)
@@ -729,14 +782,14 @@
# Copy the whole tree verbatim
merge-copy-all: $(PKGROOT) $(INSTALLISADIR)
- $(_DBG_MERGE)(cd $(INSTALLISADIR); pax -r -w -p e -v $(_PAX_ARGS) \
+ $(_DBG_MERGE)(cd $(INSTALLISADIR); umask 022 && pax -r -w -v $(_PAX_ARGS) \
$(foreach DIR,$(MERGE_DIRS),-s ",^\(\.$(DIR)/\),.$(call mergebase,$(DIR))/,p") \
. $(PKGROOT))
@$(MAKECOOKIE)
# Copy only the merge directories
merge-copy-only: $(PKGROOT)
- $(_DBG_MERGE)(cd $(INSTALLISADIR); pax -r -w -p e -v $(_PAX_ARGS) \
+ $(_DBG_MERGE)(cd $(INSTALLISADIR); umask 022 && pax -r -w -v $(_PAX_ARGS) \
$(foreach DIR,$(MERGE_DIRS),-s ",^\(\.$(DIR)/\),.$(call mergebase,$(DIR))/,p") -s ",.*,," \
. $(PKGROOT) \
)
@@ -744,7 +797,7 @@
# Copy the whole tree and relocate the directories in $(MERGE_DIRS)
merge-copy-relocate: $(PKGROOT) $(INSTALLISADIR)
- $(_DBG_MERGE)(cd $(INSTALLISADIR); pax -r -w -p e -v $(_PAX_ARGS) \
+ $(_DBG_MERGE)(cd $(INSTALLISADIR); umask 022 && pax -r -w -v $(_PAX_ARGS) \
$(foreach DIR,$(MERGE_DIRS),-s ",^\(\.$(DIR)/\),.$(call mergebase,$(DIR))/$(ISA)/,p") \
. $(PKGROOT) \
)
@@ -752,7 +805,7 @@
# Copy only the relocated directories
merge-copy-relocated-only: $(PKGROOT) $(INSTALLISADIR)
- $(_DBG_MERGE)(cd $(INSTALLISADIR); pax -r -w -p e -v $(_PAX_ARGS) \
+ $(_DBG_MERGE)(cd $(INSTALLISADIR); umask 022 && pax -r -w -v $(_PAX_ARGS) \
$(foreach DIR,$(MERGE_DIRS),-s ",^\(\.$(DIR)/\),.$(call mergebase,$(DIR))/$(ISA)/,p") -s ",.*,," \
. $(PKGROOT) \
)
@@ -760,7 +813,7 @@
# Copy
merge-copy-config-only:
- $(_DBG_MERGE)(cd $(INSTALLISADIR); pax -r -w -p e -v $(_PAX_ARGS) \
+ $(_DBG_MERGE)(cd $(INSTALLISADIR); umask 022 && pax -r -w -v $(_PAX_ARGS) \
-s ",^\(\.$(bindir)/.*-config\)\$$,\1,p" \
-s ",.*,," \
. $(PKGROOT) \
@@ -770,7 +823,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-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-git/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-git/gar.pkg.mk 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/gar.pkg.mk 2009-11-18 08:57:57 UTC (rev 7337)
@@ -165,10 +165,22 @@
$(SPKG_CLASSES) $(if $($(1)),$(if $(filter $(2),$(SPKG_CLASSES)),,$(2)))
endef
+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
# 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)
@@ -177,9 +189,13 @@
SPKG_CLASSES := $(call _spkg_cond_add,INETDCONF,cswinetd)
SPKG_CLASSES := $(call _spkg_cond_add,INITSMF,cswinitsmf)
+# This is the default path for texinfo pages to be picked up. Extend or replace as necessary.
+TEXINFO ?= $(infodir)/.*\.info(?:-\d+)? $(EXTRA_TEXINFO)
+
# - set class for all config files
-ifneq ($(SAMPLECONF)$(PRESERVECONF)$(ETCSERVICES)$(INETDCONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE),)
+ifneq ($(SAMPLECONF)$(PRESERVECONF)$(MIGRATECONF)$(ETCSERVICES)$(INETDCONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE)$(TEXINFO),)
_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)$$) );)\
@@ -187,7 +203,9 @@
$(foreach FILE,$(INITSMF),$$F[1] = "cswinitsmf" if( $$F[2] =~ m(^$(FILE)$$) );)\
$(foreach FILE,$(USERGROUP),$$F[1] = "cswusergroup" if( $$F[2] =~ m(^$(FILE)$$) );)\
$(if $(PYCOMPILE),$(foreach FILE,$(_PYCOMPILE_FILES),$$F[1] = "cswpycompile" if( $$F[2] =~ m(^$(FILE)$$) );))\
+ $(foreach FILE,$(TEXINFO),$$F[1] = "cswtexinfo" if( $$F[2] =~ m(^$(FILE)$$) );)\
print join(" ", at F),"\n";'
+
_EXTRA_GAR_PKGS += CSWcswclassutils
# Make sure the configuration files always have a .CSW suffix and rename the
# configuration files to this if necessary during merge.
@@ -274,9 +292,6 @@
$(strip
$(foreach S,$(filter-out $(1),$(_PKG_SPECS)),
$(PKGFILES_$(S))
- $(EXTRA_PKGFILES_EXCLUDED)
- $(EXTRA_PKGFILES_EXCLUDED_$(1))
- $(_EXTRA_PKGFILES_EXCLUDED)
)
)
endef
@@ -368,8 +383,10 @@
-n "$(_PKGFILES_EXCLUDE)" -o \
-n "$(ISAEXEC_FILES_$*)" -o \
-n "$(ISAEXEC_FILES)" ]; then \
- (pathfilter $(if $(or $(_PKGFILES_EXCLUDE),$(_PKGFILES_INCLUDE)),-I $(call licensedir,$*)/license) \
- $(foreach S,$(filter-out $*,$(SPKG_SPECS)),-X $(call licensedir,$S)/license) \
+ (pathfilter $(if $(or $(_PKGFILES_EXCLUDE),$(_PKGFILES_INCLUDE)),-I $(call licensedir,$*)/license -I /etc/opt/csw/pkg/$*/cswmigrateconf) \
+ $(foreach S,$(filter-out $*,$(SPKG_SPECS)),-X $(call licensedir,$S)/license -X /etc/opt/csw/pkg/$S/cswmigrateconf) \
+ $(foreach I,$(EXTRA_PKGFILES_INCLUDED) $(EXTRA_PKGFILES_INCLUDED_$*),-i '$I') \
+ $(foreach X,$(EXTRA_PKGFILES_EXCLUDED) $(EXTRA_PKGFILES_EXCLUDED_$*),-x '$X') \
$(foreach FILE,$(_PKGFILES_INCLUDE),-i '$(FILE)') \
$(if $(_PKGFILES_INCLUDE),-x '.*',$(foreach FILE,$(_PKGFILES_EXCLUDE),-x '$(FILE)')) \
$(foreach IE,$(abspath $(ISAEXEC_FILES_$*) $(ISAEXEC_FILES)), \
@@ -401,6 +418,13 @@
# $_EXTRA_GAR_PKGS is for dynamic dependencies added by GAR itself (like CSWisaexec or CSWcswclassutils)
.PRECIOUS: $(WORKDIR)/%.depend
+
+# The texinfo filter has been taken out of the normal filters as TEXINFO has a default.
+# The dependencies to CSWcswclassutils and CSWtexinfo are only added if there are files
+# actually matching the _TEXINFO_FILTER. This is done at the prototype-level.
+$(WORKDIR)/%.depend: $(WORKDIR)/$*.prototype
+$(WORKDIR)/%.depend: _EXTRA_GAR_PKGS += $(if $(shell cat $(WORKDIR)/$*.prototype | perl -ane '$(foreach FILE,$(TEXINFO),print "$$F[2]\n" if( $$F[2] =~ m(^$(FILE)$$) );)'),CSWcswclassutils)
+
$(WORKDIR)/%.depend: $(WORKDIR)
$(_DBG)$(if $(_EXTRA_GAR_PKGS)$(REQUIRED_PKGS_$*)$(REQUIRED_PKGS)$(INCOMPATIBLE_PKGS)$(INCOMPATIBLE_PKGS_$*), \
($(foreach PKG,$(INCOMPATIBLE_PKGS_$*) $(INCOMPATIBLE_PKGS),\
@@ -489,7 +513,7 @@
endef
define pkgvar
-$(if $($(1)_$(2)),$($(1)_$(2)),$($(1)))
+$(strip $(if $($(1)_$(2)),$($(1)_$(2)),$($(1))))
endef
# Make sure every producable package contains specific descriptions.
@@ -501,6 +525,11 @@
)))
.PRECIOUS: $(WORKDIR)/%.pkginfo
+
+# The texinfo filter has been taken out of the normal filters as TEXINFO has a default.
+$(WORKDIR)/%.pkginfo: $(WORKDIR)/%.prototype
+$(WORKDIR)/%.pkginfo: SPKG_CLASSES += $(if $(shell cat $(WORKDIR)/$*.prototype | perl -ane '$(foreach FILE,$(TEXINFO),print "$$F[2]\n" if( $$F[2] =~ m(^$(FILE)$$) );)'),cswtexinfo)
+
$(WORKDIR)/%.pkginfo: $(WORKDIR)
$(_DBG)(echo "PKG=$*"; \
echo "NAME=$(call catalogname,$*) - $(call pkgvar,SPKG_DESC,$*)"; \
@@ -547,7 +576,7 @@
if [ -f "$$LICENSEFILE" ]; then cp $$LICENSEFILE $(WORKDIR)/$*.copyright; fi;, \
echo "Please see $$LICENSEDIR/license for license information." > $(WORKDIR)/$*.copyright; \
) \
- mkdir -p $(PKGROOT)$$LICENSEDIR && \
+ umask 022 && mkdir -p $(PKGROOT)$$LICENSEDIR && \
rm -f $(PKGROOT)$$LICENSEDIR/license && \
cp $$LICENSEFILE $(PKGROOT)$$LICENSEDIR/license; \
fi \
@@ -559,9 +588,70 @@
reset-merge-license:
@rm -f $(COOKIEDIR)/merge-license $(foreach SPEC,$(_PKG_SPECS),$(COOKIEDIR)/merge-license-$(SPEC))
- @$(DONADA)
+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)
+
+merge-migrateconf-%: MIGRATE_FILES_$* ?= $(MIGRATE_FILES)
+merge-migrateconf-%: MIGRATE_SOURCE_DIR_$* ?= $(MIGRATE_SOURCE_DIR)
+merge-migrateconf-%: MIGRATE_DEST_DIR_$* ?= $(MIGRATE_DEST_DIR)
+merge-migrateconf-%:
+ @echo "[ Generating cswmigrateconf for package $* ]"
+ $(_DBG)ginstall -d $(PKGROOT)/etc/opt/csw/pkg/$*
+ $(_DBG)(echo "MIGRATE_FILES=\"$(MIGRATE_FILES_$*)\"";\
+ $(if $(MIGRATE_SOURCE_DIR_$*),echo "SOURCE_DIR___default__=\"$(MIGRATE_SOURCE_DIR_$*)\"";)\
+ $(if $(MIGRATE_DEST_DIR_$*),echo "DEST_DIR___default__=\"$(MIGRATE_DEST_DIR_$*)\"";)\
+ $(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)\"";)\
+ )\
+ ) >$(PKGROOT)/etc/opt/csw/pkg/$*/cswmigrateconf
+ @$(MAKECOOKIE)
+
+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
@@ -579,11 +669,7 @@
# package - Use the mkpackage utility to create Solaris packages
#
-ifneq ($(ENABLE_CHECK),0)
-PACKAGE_TARGETS = $(foreach SPEC,$(_PKG_SPECS), package-$(SPEC) pkgcheck-$(SPEC))
-else
PACKAGE_TARGETS = $(foreach SPEC,$(_PKG_SPECS), package-$(SPEC))
-endif
SPKG_DESTDIRS = $(SPKG_SPOOLDIR) $(SPKG_EXPORT)
@@ -610,7 +696,9 @@
# We depend on extract as the additional package files (like .gspec) must be
# unpacked to global/ for packaging. E. g. 'merge' depends only on the specific
# modulations and does not fill global/.
-_package: validateplatform extract-global merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package
+ENABLE_CHECK ?= 1
+_package: validateplatform extract-global merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package $(if $(ENABLE_CHECK),pkgcheck)
+ @$(MAKECOOKIE)
package: _package
@echo
@@ -624,7 +712,7 @@
@$(foreach SPEC,$(_PKG_SPECS),printf " %-20s %s\n" $(SPEC) $(SPKG_EXPORT)/$(shell $(call _PKG_ENV,$(SPEC)) $(GARBIN)/mkpackage -qs $(WORKDIR)/$(SPEC).gspec -D pkgfile).gz;)
# The dynamic pkginfo is only generated for dynamic gspec-files
-package-%: $(WORKDIR)/%.gspec $(if $(findstring %.gspec,$(DISTFILES)),,$(WORKDIR)/%.pkginfo) $(WORKDIR)/%.prototype-$(GARCH) $(WORKDIR)/%.depend
+package-%: $(WORKDIR)/%.gspec $(WORKDIR)/%.prototype-$(GARCH) $(WORKDIR)/%.depend $(if $(findstring %.gspec,$(DISTFILES)),,$(WORKDIR)/%.pkginfo)
@echo " ==> Processing $*.gspec"
$(_DBG)( $(call _PKG_ENV,$*) mkpackage --spec $(WORKDIR)/$*.gspec \
--spooldir $(SPKG_SPOOLDIR) \
@@ -642,13 +730,10 @@
# pkgcheck - check if the package is compliant
#
-pkgcheck: $(addprefix pkgcheck-,$(_PKG_SPECS))
- @$(DONADA)
+pkgcheck: $(foreach SPEC,$(_PKG_SPECS),package-$(SPEC))
+ $(_DBG)( LC_ALL=C $(GARBIN)/checkpkg $(foreach SPEC,$(_PKG_SPECS),$(SPKG_EXPORT)/`$(call _PKG_ENV,$(SPEC)) mkpackage -qs $(WORKDIR)/$(SPEC).gspec -D pkgfile`.gz ) || exit 2;)
+ @$(MAKECOOKIE)
-pkgcheck-%:
- @echo " ==> Checking compliance: $*"
- @( LC_ALL=C $(GARBIN)/checkpkg $(SPKG_EXPORT)/`$(call _PKG_ENV,$1) mkpackage -qs $(WORKDIR)/$*.gspec -D pkgfile`.gz ) || exit 2
-
pkgcheck-p:
@$(foreach COOKIEFILE,$(PKGCHECK_TARGETS), test -e $(COOKIEDIR)/$(COOKIEFILE) ;)
@@ -660,12 +745,13 @@
reset-package: pkgreset
+# Make sure we don't delete files we deliberately added with DISTFILES. They
+# will not be copied to WORKDIR again.
pkgreset-%:
@echo " ==> Reset packaging state for $* ($(DESTIMG))"
- @rm -rf $(foreach T,extract checksum package pkgcheck,$(COOKIEDIR)/*$(T)-$**)
- @rm -rf $(COOKIEDIR)/pre-package $(COOKIEDIR)/post-package
- @rm -rf $(WORKDIR)/$*.* $(WORKDIR)/prototype
- @rm -f $(WORKDIR)/copyright $(WORKDIR)/*.copyright
+ $(_DBG)rm -rf $(foreach T,extract checksum package pkgcheck,$(COOKIEDIR)/*$(T)-$**)
+ $(_DBG)rm -rf $(COOKIEDIR)/pre-package $(COOKIEDIR)/post-package
+ $(_DBG)rm -rf $(addprefix $(WORKDIR)/,$(filter-out $(DISTFILES),$(patsubst $(WORKDIR)/%,%,$(wildcard $(WORKDIR)/$*.*)) prototype copyright $*.copyright))
repackage: pkgreset package
@@ -676,7 +762,7 @@
$(if $(PACKAGING_HOST_$P),\
$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
$(MAKE) PLATFORM=$P _package && ,\
- $(SSH) -t $(PACKAGING_HOST_$P) "$(MAKE) -C $(CURDIR) PLATFORM=$P _package" && \
+ $(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -C $(CURDIR) PLATFORM=$P _package" && \
),\
$(error *** No host has been defined for platform $P)\
)\
@@ -690,7 +776,7 @@
echo " (built on this host)";\
$(MAKE) -s PLATFORM=$P _pkgshow;echo;,\
echo " (built on host '$(PACKAGING_HOST_$P)')";\
- $(SSH) $(PACKAGING_HOST_$P) "$(MAKE) -C $(CURDIR) -s PLATFORM=$P _pkgshow";echo;\
+ $(SSH) $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -C $(CURDIR) -s PLATFORM=$P _pkgshow";echo;\
)\
)
@$(MAKECOOKIE)
Modified: csw/mgar/gar/v2-git/pkglib/csw/depend.perl
===================================================================
--- csw/mgar/gar/v2-git/pkglib/csw/depend.perl 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/pkglib/csw/depend.perl 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,2 +1 @@
-P CSWcommon common - common files and dirs for CSW packages
P CSWperl perl - A high-level, general-purpose programming language
Modified: csw/mgar/gar/v2-git/pkglib/csw_cpan.gspec
===================================================================
--- csw/mgar/gar/v2-git/pkglib/csw_cpan.gspec 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/pkglib/csw_cpan.gspec 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,5 +1,6 @@
%include url file://%{PKGLIB}/csw_vars.gspec
%pkginfo url file://%{PKGLIB}/csw/pkginfo
%prototype exec cswproto -s %{TIMESTAMP} -r %{DESTDIR} %{DESTDIR}
+%depend:merge url file://%{PKGLIB}/csw/depend
%depend:merge url file://%{PKGLIB}/csw/depend.perl
%depend exec gawk '$1 ~ /f/{print $3}' %{prototype} | depmaker --root %{DESTDIR} --nodep %{pkgname} %{DEPMAKER_EXTRA_ARGS}
Copied: csw/mgar/gar/v2-git/pkglib/csw_cpan_dyngspec.gspec (from rev 7336, csw/mgar/gar/v2/pkglib/csw_cpan_dyngspec.gspec)
===================================================================
--- csw/mgar/gar/v2-git/pkglib/csw_cpan_dyngspec.gspec (rev 0)
+++ csw/mgar/gar/v2-git/pkglib/csw_cpan_dyngspec.gspec 2009-11-18 08:57:57 UTC (rev 7337)
@@ -0,0 +1,5 @@
+%include url file://%{PKGLIB}/csw_vars.gspec
+%pkginfo url file://%{PKGLIB}/csw/pkginfo
+%prototype exec cswproto -s %{TIMESTAMP} -r %{DESTDIR} %{DESTDIR}
+%depend:merge url file://%{PKGLIB}/csw/depend.perl
+%depend exec gawk '$1 ~ /f/{print $3}' %{prototype} | depmaker --root %{DESTDIR} --nodep %{pkgname} %{DEPMAKER_EXTRA_ARGS}
Modified: csw/mgar/gar/v2-git/pkglib/csw_dyngspec.gspec
===================================================================
--- csw/mgar/gar/v2-git/pkglib/csw_dyngspec.gspec 2009-11-18 03:12:37 UTC (rev 7336)
+++ csw/mgar/gar/v2-git/pkglib/csw_dyngspec.gspec 2009-11-18 08:57:57 UTC (rev 7337)
@@ -1,5 +1,4 @@
%include url file://%{PKGLIB}/csw_vars.gspec
%include url file://%{PKGLIB}/csw_prototype.gspec
%pkginfo url file://%{WORKSRC}/csw/pkginfo
-%depend:merge url file://%{PKGLIB}/csw/depend
%include url file://%{PKGLIB}/std_depend.gspec
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