Index: /trunk/psconfig/psbuild
===================================================================
--- /trunk/psconfig/psbuild	(revision 8867)
+++ /trunk/psconfig/psbuild	(revision 8867)
@@ -0,0 +1,130 @@
+#!/bin/tcsh
+
+set args=""
+set clean=0
+set rebuild=0
+set update=0
+set optimize=0
+while ($#argv)
+ switch ($1)
+  case -clean:
+   set clean=1;
+   breaksw;
+  case -rebuild:
+   set rebuild=1;
+   set clean=1;
+   breaksw;
+  case -update:
+   set update=1;
+   breaksw;
+  case -opt:
+   set optimize=1;
+   breaksw;
+  default:
+   set args=($args $1);
+   breaksw;
+ endsw
+ shift
+end
+
+if ($#args != 2) goto usage
+if ("$args" == "") goto usage
+
+set version = $args[1]
+set group   = $args[2]
+set tagsets = psconfig/tagsets/$group
+
+if (! -e $tagsets) then
+  echo "target $group not found in tagsets"
+  exit 2
+endif
+
+psconfig $version
+
+set psopts = ""
+if ($optimize) set psopts = "$psopts --enable-optimize"
+
+foreach target (`cat $tagsets | grep -v \#`)
+ set name = `echo $target | tr ':' ' '`
+ set dir = $name[1]
+ set tag = $name[2]
+
+ cd $dir
+ 
+ if ($update) then
+  switch ($tag)
+   case HEAD:
+    cvs -q up -d -A
+    if ($status) goto failure;
+    breaksw;
+   case NONE:
+    breaksw;
+   default:
+    cvs -q up -d -r $tag
+    if ($status) goto failure;
+    breaksw;
+  endsw
+ endif
+
+ # how do we build this component?
+ # - autogen.sh : configure : make : make install
+ # - configure : make : make install
+ # - make : make install
+ # - perl Build.PL : ./Build : ./Build install
+ 
+ if (-e Build.PL) then
+    echo $PERL5LIB
+    psperlbuild
+    # perl Build.PL --install_path script=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
+    if ($status) goto failure;
+
+    ./Build
+    if ($status) goto failure;
+
+    ./Build install
+    if ($status) goto failure;
+
+    goto success;
+ endif
+
+ if (! -e Makefile) set rebuild = 1
+
+ if ($rebuild && ! -e configure && -e autogen.sh) then
+    psautogen $psopts
+    if ($status) goto failure;
+ endif
+
+ if ($rebuild && -e configure) then
+    psconfigure $psopts
+    if ($status) goto failure;
+ endif
+
+ if (! -e Makefile) goto failure;
+
+ if ($clean) then 
+    make clean
+    if ($status) goto failure;
+ endif
+
+ make
+ if ($status) goto failure;
+
+ make install
+ if ($status) goto failure;
+
+ success:
+ cd ..
+end
+
+exit 0
+
+usage:
+  echo "USAGE: build (version) (group) [-clean] [-update]"
+  exit 2
+
+failure:
+  echo "build failed"
+  echo "target: $target"
+  echo "dir: $dir"
+  echo "tag: $tag"
+  exit 2
Index: /trunk/psconfig/psconfig.sh
===================================================================
--- /trunk/psconfig/psconfig.sh	(revision 8866)
+++ /trunk/psconfig/psconfig.sh	(revision 8867)
@@ -52,4 +52,5 @@
 if ($?LD_LIBRARY_PATH == 0) setenv LD_LIBRARY_PATH
 if ($?PKG_CONFIG_PATH == 0) setenv PKG_CONFIG_PATH
+if ($?PERL5LIB == 0) setenv LD_LIBRARY_PATH
 
 # identify system architecture
@@ -156,4 +157,30 @@
 endif 
 
+set plibdir  = {$PSCONFDIR}/{$PSCONFIG}/lib
+set newpath = ""
+set pathlist = `echo $PERL5LIB | tr ':' '\n'`
+foreach name ($pathlist)
+  echo $name | grep $PSCONFDIR > /dev/null
+  if ($status == 0) continue
+  if ($newpath == "") then
+    set newpath = {$name}:
+  else
+    set newpath = {$newpath}{$name}:
+  endif
+end
+if ("$PSCONFIG" == "none") then
+  if ("$newpath" == "") then
+    unsetenv PERL5LIB
+  else
+    setenv PERL5LIB {$newpath}
+  endif 
+else
+  if ("$newpath" == "") then
+    setenv PERL5LIB {$plibdir}:
+  else
+    setenv PERL5LIB {$plibdir}:{$newpath}
+  endif 
+endif 
+
 set newpath = ""
 set pathlist = `echo $PKG_CONFIG_PATH | tr ':' '\n'`
@@ -184,6 +211,8 @@
   alias  psconfigure configure
   alias  psautogen autogen.sh
+  alias  psperlbuild perl Build.PL
 else
   alias  psconfigure configure --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
   alias  psautogen autogen.sh --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
-endif
+  alias  psperlbuild perl Build.PL --install_path script=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
+endif
Index: /trunk/psconfig/tagsets/ippHead
===================================================================
--- /trunk/psconfig/tagsets/ippHead	(revision 8867)
+++ /trunk/psconfig/tagsets/ippHead	(revision 8867)
@@ -0,0 +1,20 @@
+pslib:HEAD
+psmodules:HEAD
+
+psphot:HEAD
+psastro:HEAD
+ppStats:HEAD
+ppImage:HEAD
+ppArith:HEAD
+ppNorm:HEAD
+ppFringe:HEAD
+
+# these are the required perl modules from IPP
+# there are externally required perl modules (see README?)
+PS-IPP-Metadata-Config:HEAD
+PS-IPP-Metadata:HEAD
+
+glueforge:HEAD
+dbconfig:HEAD
+ippdb:NONE
+ippTools/pXtools:HEAD
