further fixes for gridsite
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2010 16:27:48 +0000 (16:27 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2010 16:27:48 +0000 (16:27 +0000)
produces RPMs of org.gridsite.core with identical list of files now

org.glite.lb/configure

index 78f66d8..d449da0 100755 (executable)
@@ -86,7 +86,7 @@ my %extrafull;
 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/], 
@@ -237,17 +237,16 @@ sub mode_build {
        
        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";
@@ -259,9 +258,9 @@ sub mode_build {
                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;
@@ -499,8 +498,13 @@ for my $ext (keys %deps_aux) {
        '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
@@ -532,19 +536,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        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
@@ -669,9 +673,9 @@ sub mode_etics {
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
@@ -704,11 +708,11 @@ sub mode_etics {
 
        if ($subsys eq 'gridsite') {
                if ($module eq 'core') {
-                       my $flags = 'make prefix=${prefix} libdir=${libdir} 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"';
+                       my $flags = '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 RELEASE_VERSION=1.\${platformFamily} $flags rpm";
+                       $cmd{packaging} = "make RELEASE_VERSION=${age}.\${platformFamily} $flags rpm";
                }
                else {
                        $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
@@ -750,7 +754,7 @@ checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
@@ -777,7 +781,7 @@ $defprops
 
        for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
                next if $pp eq 'default';
-               print C "[Platform-$pp:Property]\n";
+               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";