IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11730


Ignore:
Timestamp:
Feb 9, 2007, 10:53:32 AM (19 years ago)
Author:
eugene
Message:

updates

Location:
trunk/psconfig
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/mkdist

    r11651 r11730  
    11#!/usr/bin/env perl
     2
     3$tagsets = "tagsets";
    24
    35$cvs  = 0;
     
    68$deltag = 0;
    79$setbranch = 0;
    8 $list = 0;
     10$setdevtag = 0;
    911$module = "";
    1012@tARGV = ();
     
    2224        shift; next;
    2325    }
     26    if ($ARGV[0] eq "-devtag") {
     27        $setdevtag = 1;
     28        shift; next;
     29    }
    2430    if ($ARGV[0] eq "-deltag") {
    2531        $deltag = 1;
    26         shift; next;
    27     }
    28     if ($ARGV[0] eq "-list") {
    29         $list = 1;
    3032        shift; next;
    3133    }
     
    3941        shift; next;
    4042    }
     43    if ($ARGV[0] eq "-list") {
     44        &list_distributions ();
     45    }
    4146    if ($ARGV[0] eq "-h")     { &usage (); }
    4247    if ($ARGV[0] eq "-help")  { &usage (); }
     
    4752@ARGV = @tARGV;
    4853
    49 $distdir = "tagsets";
     54if ( @ARGV != 1) { &usage (); }
    5055
    51 if (!$list && @ARGV != 1) { &usage (); }
    52 if ( $list && @ARGV != 0) { &usage (); }
    53 
    54 $file = "$distdir/$ARGV[0].dst";
    55 open (FILE, $file) || die "ERROR: can't open distribution file\n";
    56 @list = <FILE>;
    57 close (FILE);
    58 
    59 $version = $ARGV[0];
    60 
    61 @name = ();
    62 @tag = ();
    63 @branch = ();
    64 
    65 if ($list) {
    66     printf STDERR "Available Distributions\n";
    67     printf STDERR "%-16s  %7s\n", "Module", "Version";
    68     printf STDERR "-------------------------\n";
    69 }
    70 
    71 foreach $line (@list) {
    72     chop $line;
    73     if ($line =~ m|^\s*$|) { next; }
    74     if ($line =~ m|^\s*\#|) { next; }
    75 
    76     ($name, $branch, $branchver, $mode) = split (":", $line);
    77    
    78     if ($name eq "") { die "missing module name\n"; }
    79    
    80     if ($branch eq "") {
    81         $branch = "HEAD";
    82     }
    83     if ($branch eq "HEAD") {
    84         $tag = "HEAD";
    85     }
    86     if ($branch eq "NONE") {
    87         $tag = "NONE";
    88     }
    89     if (($tag ne "HEAD") && ($branchver eq "")) {
    90         $branchver = "0";
    91     }
    92     if (($branch ne "HEAD") && ($branch ne NONE)) {
    93         $tag = "$branch-$branchver";
    94     }
    95     if (($branch ne "HEAD") && ($branch ne "NONE") && ($branchver eq "NONE")) {
    96         $tag = "$branch";
    97     }
    98     # print  "module: $name, tag: $tag, branch: $branch\n";
    99 
    100     push @name, $name;
    101     push @branch, $branch;
    102     push @tag, $tag;
    103     push @mode, $mode;
    104 }
    105 
    106 if ($list) { exit 0; }
     56$distribution = $ARGV[0];
     57&load_distfile ();
    10758
    10859if ($diff) { &difflist (); }
    109 
    11060if ($settag) { &settags (); }
    11161
    112 mkdir $version;
    113 chdir $version;
    114 for ($i = 0; $i < @name; $i++) {
    115     if (($module ne "") && ($module ne $name[$i])) { next; }
    116     if ($mode[$i] eq "SKIP") { next; }
    117     if ($tag[$i] eq "HEAD") {
    118         &vsystem ("cvs co $name[$i]");
    119         if ($status) { die "error running cvs"; }
    120     } else {
    121         &vsystem ("cvs co -r $tag[$i] $name[$i]");
    122         if ($status) { die "error running cvs"; }
    123     }   
    124 }
    125 chdir "..";
    126 if ($cvs) { exit 0; }
    127 
    128 &vsystem ("rm -r `find $version -name CVS`");
    129 if (! -e tarballs) { mkdir "tarballs"; }
    130 &vsystem ("tar cvzf tarballs/$version.tgz  $version");
    131 if ($status) { die "error creating tarball\n"; }
    132 exit 0;
     62&package_distribution ();
    13363
    13464sub vsystem {
    13565    print STDERR "@_\n";
    136     $status = system ("@_");
    137     $status;
    138 }
    139 
    140 sub usage {
    141     print STDERR "USAGE: mkdist -list\n";
    142     print STDERR "     : list valid distributions \n\n";
    143     print STDERR "USAGE: mkdist (group) (version) [-cvs]\n";
    144     print STDERR "     : make a distribution tarball\n";
    145     print STDERR "     : -cvs  : only check out the cvs tree, don't make a tarball\n\n";
    146     print STDERR "USAGE: mkdist -diff (group) (version)\n";
    147     print STDERR "     : show the difference between the distribution and current tree\n\n";
    148     exit 2;
     66    #$status = system ("@_");
     67    #$status;
    14968}
    15069
    15170sub difflist {
    15271
    153     for ($i = 0; $i < @name; $i++) {
     72    for ($i = 0; $i < @cvsname; $i++) {
    15473        # the base component cannot be rdiffed
    155         print STDERR "--- $name[$i] ---\n";
    156         if ($name[$i] eq "base") { next; }
     74        print STDERR "--- $cvsname[$i] ---\n";
     75        if ($cvsname[$i] eq "base") { next; }
    15776        if ($tag[$i] eq "") {
    158             &vsystem ("cvs -q rdiff -s -r HEAD $name[$i]");
     77            &vsystem ("cvs -q rdiff -s -r HEAD $cvsname[$i]");
    15978        } else {
    160             &vsystem ("cvs -q rdiff -s -r $tag[$i] $name[$i]");
     79            &vsystem ("cvs -q rdiff -s -r $tag[$i] $cvsname[$i]");
    16180        }       
    16281        print STDERR "\n\n";
     
    16786sub settags {
    16887    print STDERR "setting tags\n";
    169     for ($i = 0; $i < @name; $i++) {
    170         # can the base component be tagged?
    171         if ($name[$i] eq "base") {
    172             # make this automatic by checking it out and cd'ing there
    173             print STDERR "remember to set the base tag by hand\n";
     88    for ($i = 0; $i < @cvsname; $i++) {
     89        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     90        ($do_tag, $do_build, $do_package, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
     91        if ($do_tag eq "N") {
     92            push @remind, $cvsname[$i];
    17493            next;
    17594        }
    176         if ($tag[$i] eq "") { next; }
    177         if ($tag[$i] eq "HEAD") { next; }
    178         if ($tag[$i] eq "NONE") { next; }
    179         if ($mode[$i] eq "EXTERN") {
    180             print STDERR "remember to set tag for $name[$i]\n";
    181             next;
     95        if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
     96        if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
     97        $tag = "$branchtag[$i]$branchver[$i]";
     98        if ($setbranch) {
     99            &vsystem ("cvs -q rtag -b $branchtag[$i] $cvsname[$i]");
     100            next;
     101        }
     102        if ($setdevtag) {
     103            &vsystem ("cvs -q rtag $tag $cvsname[$i]");
     104            next;
    182105        }
    183         $flag = "";
    184         if ($setbranch) {
    185             &vsystem ("cvs -q rtag -b $branch[$i] $name[$i]");
    186         } else {
    187             &vsystem ("cvs -q rtag -r $branch[$i] $tag[$i] $name[$i]");
    188         }
     106        &vsystem ("cvs -q rtag -r $branchtag[$i] $tag $cvsname[$i]");
     107    }
     108    for ($i = 0; $i < @remind; $i++) {
     109        print STDERR "remember to set tag for $remind[$i] if needed\n";
    189110    }
    190111    exit 0;
    191112}
     113
     114sub package_distribution {
     115    # package distribution into a tarball
     116    mkdir $distribution;
     117    chdir $distribution;
     118    for ($i = 0; $i < @cvsname; $i++) {
     119        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     120        ($do_tag, $do_build, $do_package, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
     121        if ($do_package eq "N") { next; }
     122        if ($tag[$i] eq "HEAD") {
     123            &vsystem ("cvs co $cvsname[$i]");
     124            if ($status) { die "error running cvs"; }
     125        } else {
     126            &vsystem ("cvs co -r $tag[$i] $cvsname[$i]");
     127            if ($status) { die "error running cvs"; }
     128        }       
     129    }
     130    chdir "..";
     131    if ($cvs) { exit 0; }
     132
     133    &vsystem ("rm -r `find $distribution -name CVS`");
     134    if (! -e tarballs) { mkdir "tarballs"; }
     135    &vsystem ("tar cvzf tarballs/$distribution.tgz  $distribution");
     136    if ($status) { die "error creating tarball\n"; }
     137    exit 0;
     138}
     139
     140sub list_distributions {
     141
     142    vsystem ("ls $tagsets/*.dst");
     143    exit 2;
     144}
     145
     146sub load_distfile {
     147    # open and read the distribution file
     148    # results go into @cvsname, @branchtag, @branchver, @mode
     149    $file = "$tagsets/$ARGV[0].dst";
     150    open (FILE, $file) || die "ERROR: can't open distribution file $file\n";
     151    @list = <FILE>;
     152    close (FILE);
     153
     154    @mode = ();
     155    @cvsname = ();
     156    @branchtag = ();
     157    @branchver = ();
     158
     159    foreach $line (@list) {
     160        chop $line;
     161        if ($line =~ m|^\s*$|) { next; }
     162        if ($line =~ m|^\s*\#|) { next; }
     163
     164        ($mode, $cvsname, $branchtag, $branchver) = split (" ", $line);
     165       
     166        if ($cvsname eq "") { die "missing module name\n"; }
     167
     168        ($do_tag, $do_build, $do_package, $do_update) = $mode =~ m|(\S)(\S)(\S)(\S)|;
     169        if (($do_tag ne "Y") && ($do_tag ne "N")) { die "invalid tag option $do_tag\n"; }
     170        if (($do_build ne "Y") && ($do_build ne "N")) { die "invalid tag option $do_build\n"; }
     171        if (($do_package ne "Y") && ($do_package ne "N")) { die "invalid tag option $do_package\n"; }
     172        if (($do_update ne "Y") && ($do_update ne "N")) { die "invalid tag option $do_update\n"; }
     173       
     174        print "module: $cvsname, branchtag: $branchtag, branchver: $branchver ";
     175        print "tag: $do_tag, build: $do_build, package: $do_package, update: $do_update\n";
     176
     177        push @mode, $mode;
     178        push @cvsname, $cvsname;
     179        push @branchtag, $branchtag;
     180        push @branchver, $branchver;
     181    }
     182}
     183
     184sub usage {
     185    print STDERR "USAGE: mkdist -list\n";
     186    print STDERR "     : list valid distributions \n\n";
     187    print STDERR "USAGE: mkdist (distribution) [-cvs]\n";
     188    print STDERR "     : make a distribution tarball\n";
     189    print STDERR "     : -cvs  : only check out the cvs tree, don't make a tarball\n\n";
     190    print STDERR "USAGE: mkdist -diff (group) (version)\n";
     191    print STDERR "     : show the difference between the distribution and current tree\n\n";
     192    exit 2;
     193}
     194
  • trunk/psconfig/psconfig.sh

    r11267 r11730  
    3131
    3232# list the defined psconfig versions
     33if ("$argv[1]" == "--prefix") then
     34  echo $PSCONFDIR/$PSVERSION.$ARCH
     35  exit 0
     36endif
     37
     38# list the defined psconfig versions
    3339if ("$argv[1]" == "--libs") then
    3440  echo $PSCONFDIR/$PSVERSION.$ARCH/lib
     
    4046  echo $PSCONFDIR/$PSVERSION.$ARCH/bin
    4147  exit 0
     48endif
     49
     50# list the defined psconfig versions
     51set show_path = 0
     52if ("$argv[1]" == "--path") then
     53  set show_path = 1
     54  shift
     55endif
     56
     57# list the defined psconfig versions
     58set show_ldpath = 0
     59if ("$argv[1]" == "--ldpath") then
     60  set show_ldpath = 1
     61  shift
     62endif
     63
     64# list the defined psconfig versions
     65set show_pkgpath = 0
     66if ("$argv[1]" == "--pkgpath") then
     67  set show_pkgpath = 1
     68  shift
     69endif
     70
     71# list the defined psconfig versions
     72set show_perlpath = 0
     73if ("$argv[1]" == "--perlpath") then
     74  set show_perlpath = 1
     75  shift
    4276endif
    4377
     
    245279  alias  psperlbuild perl Build.PL --prefix {$PSCONFDIR}/{$PSCONFIG} --install_path script=$bindir --install_path arch=$bindir --install_path bin=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
    246280endif
     281
     282# list the defined psconfig versions
     283if ($show_path) then
     284  echo $PATH
     285  exit 0
     286endif
     287
     288# list the defined psconfig versions
     289if ($show_ldpath) then
     290  echo $LD_LIBRARY_PATH
     291  exit 0
     292endif
     293
     294# list the defined psconfig versions
     295if ($show_pkgpath) then
     296  echo $PKG_CONFIG_PATH
     297  exit 0
     298endif
     299
     300# list the defined psconfig versions
     301if ($show_perlpath) then
     302  echo $PERL5LIB
     303  exit 0
     304endif
     305
  • trunk/psconfig/tagsets/ipp-1.0.dst

    r11652 r11730  
     1# necessary fields:                   
     2# |-- tag?
     3# ||-- build?
     4# |||-- package?
     5# ||||-- update?
     6# ||||
     7# ||||  CVS module     CVS branch tag   CVS branch version   
     8# ||||
     9  NYNY  Ohana
     10  NNYN  ohana.base     base-1-5         -0
     11  NNYN  libohana       libohana-1-9     -0
     12  NNYN  libfits        libfits-1-7      -0
     13  NNYN  libautocode    libautocode-1-6  -0
     14  NNYN  libdvo         libdvo-1-4       -0
     15  NNYN  libkapa        libkapa-1-3      -0
     16  NNYN  addstar        addstar-1-8      -0
     17  NNYN  delstar        delstar-1-7      -0
     18  NNYN  getstar        getstar-1-3      -0
     19  NNYN  kapa           kapa-1-7         -0
     20  NNYN  kii            kii-1-7          -0
     21  NNYN  relphot        relphot-1-5      -0
     22  NNYN  uniphot        uniphot-1-5      -0
     23  NNYN  opihi.base     opihi-2-9        -0
     24  NNYN  mana           mana-1-7         -0
     25  NNYN  dvo            dvo-1-0          -0
     26  NNYN  pantasks       pantasks-1-0     -0
     27  NNYN  pcontrol       pcontrol-1-0     -0
     28  NNYN  pclient        pclient-1-0      -0
     29  NYYY  psLib          rel-1-0          -0
     30  NYYY  psModules      rel-1-0          -0
     31  YYYY  psphot         rel-0-8          -0
     32  YYYY  psastro        rel-0-8          -0
     33  YYYY  ppStats        rel-1-0          -0
     34  YYYY  ppImage        rel-1-0          -0
     35  YYYY  ppNorm         rel-1-0          -0
     36  YYYY  ppMerge        rel-1-0          -0
     37  YNYY  pois           rel-0-1          -0
     38  YNYY  pswarp         rel-0-1          -0
     39  YNYY  ppStac         rel-0-1          -0
     40  YYYY  PS-IPP-Metadata-Config rel-1-0  -0
     41  YYYY  PS-IPP-Config          rel-1-0  -0
     42  YYYY  ippScripts     rel-1-0          -0
     43  YYYY  glueforge      rel-1-0          -0
     44  YYYY  dbconfig       rel-1-0          -0
     45  NYNN  ippdb.src                     
     46  YYYY  ippconfig      rel-1-0          -0
     47  YYYY  ippTools       rel-1-0          -0
     48  YYYY  ippTasks       rel-1-0          -0
     49  YYYY  simtest        rel-0-8          -0
     50  YNYY  psconfig       rel-1-0          -0
     51  YNYY  ippMonitor     rel-1-0          -0
    152
    2 # mode EXTERN means package cannot be tagged / updated in this tree
    3 # mode SKIP means exclude from the build process
    4 # model
    5 
    6 ohana.base:base-1-5:0:EXTERN
    7 
    8 libohana:libohana-1-9:0:EXTERN
    9 libfits:libfits-1-7:0:EXTERN
    10 libautocode:libautocode-1-6:0:EXTERN
    11 libdvo:libdvo-1-4:0:EXTERN
    12 libkapa:libkapa-1-3:0:EXTERN
    13 
    14 addstar:addstar-1-8:0:EXTERN
    15 delstar:delstar-1-7:0:EXTERN
    16 getstar:getstar-1-3:0:EXTERN
    17 kapa:kapa-1-7:0:EXTERN
    18 kii:kii-1-7:0:EXTERN
    19 relphot:relphot-1-5:0:EXTERN
    20 uniphot:uniphot-1-5:0:EXTERN
    21 
    22 opihi.base:opihi-2-9:0:EXTERN
    23 mana:mana-1-7:0:EXTERN
    24 dvo:dvo-1-0:0:EXTERN
    25 pantasks:pantasks-1-0:0:EXTERN
    26 pcontrol:pcontrol-1-0:0:EXTERN
    27 pclient:pclient-1-0:0:EXTERN
    28 
    29 psLib:rel-1_0_0:NONE:EXTERN
    30 psModules:rel-1_0_0:NONE:EXTERN
    31 
    32 psphot:rel-0-8:0
    33 psastro:rel-0-8:0
    34 ppStats:rel-1-0:0
    35 ppImage:rel-1-0:0
    36 ppNorm:rel-1-0:0
    37 ppMerge:rel-1-0:0
    38 
    39 pois:rel-0-1:0
    40 pswarp:rel-0-1:0
    41 ppStac:rel-0-1:0
    42 
    43 # these are the required perl modules from IPP
    4453# there are externally required perl modules (see README?)
    45 PS-IPP-Metadata-Config:rel-1-0:0
    46 PS-IPP-Config:rel-1-0:0
    47 ippScripts:rel-1-0:0
    48 
    49 glueforge:rel-1:0
    50 dbconfig:rel-1-0:0
    51 
    52 ippdb.src:NONE:0:SKIP
    53 
    54 ippconfig:rel-1-0:0
    55 ippTools:rel-1-0:0
    56 ippTasks:rel-1-0:0
    57 simtest:rel-0-8:0
    58 
    59 psconfig:rel-1-0:0
    60 ippMonitor:rel-1-0:0
    61 
Note: See TracChangeset for help on using the changeset viewer.