my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};
my %extranodmod;
my %deps;
my %deps_type;
-my %topbuild;
+my %buildroot;
my %lbmodules = (
'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
+ 'gridsite' => [ qw/apache shared commands core/ ],
);
for (@modules) {
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
- print MAK "\tcd $full$build && \${MAKE} clean\n"
+ print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
}
print MAK "\ndistclean:\n";
for (@modules) {
my $full = full($_);
- print MAK $topbuild{$_} ?
- "\tcd $full$build && \${MAKE} distclean\n" :
- "\trm -rf $full$build\n"
+ print MAK $buildroot{$_} eq '' ?
+ "\tcd $full && \${MAKE} distclean\n" :
+ "\trm -rf $full/$buildroot{$_}\n"
}
print MAK "\n";
my @dnames = $module ? () : keys %ldeps;
my $full = full($_);
- my $build = $topbuild{$_} ? '': '/build';
+ my $build = $buildroot{$_};
- print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+ print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
}
close MAK;
'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
+ 'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
);
for my $ext (keys %need_externs_aux) {
'lb.yaim' => [ qw// ],
'lb.glite-LB' => [ qw/
lb.logger:R lb.server:R lb.utils:R lb.doc:R
- lb.ws-test:R lb.harvester:R lb.yaim:R
+ lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
/ ],
'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
'lbjp-common.maildir' => [ qw// ],
+ 'lbjp-common.log' => [ qw// ],
'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
'lbjp-common.trio' => [ qw// ],
'security.gss' => [ qw// ],
lbjp-common.jp-interface lbjp-common.db
/ ],
'jp.ws-interface' => [ qw// ],
+
+ 'gridsite.core' => [ qw/build.common-cpp:B/ ],
);
for my $ext (keys %deps_aux) {
'lb.yaim' => [ qq/glite-yaim-lb/ ],
);
+%cvs_prefix = (
+ 'lb' => 'org.glite',
+ 'jp' => 'org.glite',
+ 'jobid' => 'org.glite',
+ 'lbjp-common' => 'org.glite',
+ 'gridsite' => 'org',
+);
+
+%conf_prefix = (
+ 'lb' => 'glite-',
+ 'jp' => 'glite-',
+ 'jobid' => 'glite-',
+ 'lbjp-common' => 'glite-',
+ 'gridsite' => '',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
}
sub full
my $build = '';
- unless ($topbuild{$_}) {
- $build = '/build';
- unless (-d "$full/build") {
- mkdir "$full/build" or die "mkdir $full/build: $!\n";
+ unless ($buildroot{$_} eq '') {
+ $build = "/$buildroot{$_}";
+ unless (-d "$full/$buildroot{$_}") {
+ mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
}
- unlink "$full/build/Makefile";
- symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+ unlink "$full/$buildroot{$_}/Makefile";
+ symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
}
- open MKINC,">$full$build/Makefile.inc"
- or die "$full$build/Makefile.inc: $!\n";
+ open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+ or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
- print "Creating $full$build/Makefile.inc\n";
+ print "Creating $full/$buildroot{$_}/Makefile.inc\n";
print MKINC qq{
PREFIX = $prefix
vdt=>[qw/globus globus_essentials/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+
+ %platform_properties = (
+ 'gridsite.core' => {
+ sl5_x86_64_gcc412 => { aprSuffix => '1' },
+ sl5_ia32_gcc412 => { aprSuffix => '1' },
+ deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+ deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+ slc4_x86_64_gcc346 => { aprSuffix => '0' },
+ slc4_ia32_gcc346 => { aprSuffix => '0' },
+ default => {
+ }
+ },
+ );
};
sub mode_etics {
($major,$minor,$rev,$age) = ($1,$2,$3,$4);
}
else {
- open V,"org.glite.$subsys.$module/project/version.properties"
- or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+ open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+ or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
while ($_ = <V>) {
chomp;
my $conf;
my $conftag;
+ $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
if ($branch) {
- $conf = "glite-${subsys}-${module}_$branch";
- $conftag = $branch;
- $dwpath = ""; }
+ $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conftag = $branch;
+ $age = '0dev'; }
else {
- $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
- $conftag = $conf;
- $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-# my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+
+# XXX: gridsite hack
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
- my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+ my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
- my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+ my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
my $package_description = "";
my $package_summary = "";
- if (-e "org.glite.$subsys.$module/project/package.description") {
- open V, "org.glite.$subsys.$module/project/package.description";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
$package_description = join ("", <V>);
close V;
chomp $package_description;
$package_description =~ s/\n/\\n/g;
- $package_description = "package.description = $package_description";
+ $package_description = "package.description = $package_description\n";
}
else {
print STDERR "package.description not found for $subsys.$module!\n"; }
- if (-e "org.glite.$subsys.$module/project/package.summary") {
- open V, "org.glite.$subsys.$module/project/package.summary";
+ if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+ open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
$package_summary = join ("", <V>);
close V;
chomp $package_summary;
$package_summary =~ s/\n/\\n/g;
- $package_summary = "package.summary = $package_summary";
+ $package_summary = "package.summary = $package_summary\n";
}
else {
print STDERR "package.summary not found for $subsys.$module!\n"; }
+ my %cmd;
+ @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+ $cmd{clean} = 'make clean';
+
+ if ($subsys eq 'gridsite') {
+ if ($module eq 'core') {
+ my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+
+ $cmd{compile} = "make $flags build";
+ $cmd{install} = "make $flags install";
+ $cmd{packaging} = "make $flags rpm";
+ }
+ else {
+ $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+ }
+ }
+ else {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{compile} = 'make';
+ $cmd{test} = 'make check';
+ $cmd{install} = 'make install';
+ }
+
+ my $defprops = '';
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+ $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
+ }
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
projectName = org.glite
age = $age
deploymentType = None
[Platform-default:BuildCommand]
postpublish = None
-packaging = None
+packaging = $cmd{packaging}
displayName = None
description = None
doc = None
prepublish = None
publish = None
-compile = make
+compile = $cmd{compile}
init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
checkstyle = None
[Platform-default:Property]
$buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
};
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
}
+ for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+ next if $pp eq 'default';
+ print C "[Platform-$pp:Property]\n$buildroot\n";
+
+ for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+ print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+ }
+ print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+ print C "$package_description$package_summary\n";
+ }
+
print C qq{
[Platform-default:DynamicDependency]
};