gridsite etics configurations updates:
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 28 Jun 2011 08:51:12 +0000 (08:51 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 28 Jun 2011 08:51:12 +0000 (08:51 +0000)
- emi-specific .spec file
- proper configuration names
- specify prefix in build commands
- cleanup the directory with published sources

org.glite.lb/configure

index 2e34da2..aeb32ba 100755 (executable)
@@ -825,7 +825,7 @@ for my $ext (keys %deps_aux) {
                        'jp' => 'emi-',
                        'jobid' => 'emi-',
                        'lbjp-common' => 'emi-',
-                       'gridsite' => '',
+                       'gridsite' => 'emi-',
                        'px' => 'emi-',
                },
                tag_prefix => { %cvs_tag_prefix },
@@ -1158,7 +1158,7 @@ sub mode_etics {
                $cmd{tag} = 'None';
 
                if ($module eq 'core') {
-                       my ($flags, $prefix);
+                       my ($flags, $prefix, $make_patches);
 
                        if ($project ne 'glite') {
                                $flags = 'RELEASE_VERSION=${age}.${platformFamily} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
@@ -1167,11 +1167,19 @@ sub mode_etics {
                                $flags = 'RELEASE_VERSION=${age}.${platformFamily} 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"';
                                $prefix = 'prefix=${prefix}';
                        }
+                       if ($project eq 'emi') {
+                               # proper dependency name in spec-file
+                               $cmd{checkout} .= " && \\
+       (cd \${moduleName}; test -f src/make-gridsite-spec.orig || sed -i.orig 's/\\(Buildrequires: libxml2-devel.*\\)/\\1,globus-gssapi-gsi-devel/' src/make-gridsite-spec)";
+                               $make_patches = "
+       diff -up make-gridsite-spec.orig make-gridsite-spec > \${moduleDir}/RPMTMP/SOURCES/emi-deps.patch
+       diff -up make-gridsite-spec.orig make-gridsite-spec > \${moduleDir}/src/tgz/emi-deps.patch";
+                       }
 
-                       $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $flags build";
-                       $cmd{clean} = "rm -rvf build.sh; $cmd{clean}";
+                       $cmd{compile} = "echo 'make $flags' > build.sh\n\tmake $prefix $flags build";
+                       $cmd{clean} = "rm -rvf build.sh \${moduleDir}/src/tgz; $cmd{clean}";
                        $cmd{install} = "make $prefix $flags install";
-                       $cmd{packaging} = "mkdir \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz
+                       $cmd{packaging} = "mkdir -p \${moduleDir}/RPMTMP/SOURCES \${moduleDir}/src/tgz 2>/dev/null || true $make_patches
        make $prefix $flags rpm && \
        cp \${moduleDir}/RPMTMP/SOURCES/gridsite-\${version}.src.tar.gz \${moduleDir}/src/tgz";
                }