/[pdpsoft]/trunk/grid-mw-security/glexec/util/glexec_from_source/glexec_from_source.sh
ViewVC logotype

Diff of /trunk/grid-mw-security/glexec/util/glexec_from_source/glexec_from_source.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1820 by msalle, Wed Jun 23 19:05:22 2010 UTC revision 1821 by msalle, Tue Jun 29 15:06:11 2010 UTC
# Line 23  export prefix=${glite}             # Where to i Line 23  export prefix=${glite}             # Where to i
23  #export CVSROOT=:pserver:anonymous@glite.cvs.cern.ch:/cvs/glite # anonymous CVS  #export CVSROOT=:pserver:anonymous@glite.cvs.cern.ch:/cvs/glite # anonymous CVS
24  export webcvs=http://glite.cvs.cern.ch/cgi-bin/glite.cgi/       # Web CVS  export webcvs=http://glite.cvs.cern.ch/cgi-bin/glite.cgi/       # Web CVS
25    
26    # Valid return codes: anything less than RC_FAILED is non-blocking
27    export RC_SUCCESS=0
28    export RC_SKIPPED=1
29    export RC_FAILED=2
30    export RC_MISSDEP=3
31    
32    # Parse command line options
33    DEPEND=1
34    USAGE=0
35    targets=""
36    while [ $# -gt 0 ];do
37        case "$1" in
38            -c*)    DEPEND=0 ;;
39            -h*)    USAGE=1 ;;
40            *)      targets="$targets $1" ;;
41        esac
42        shift
43    done
44    
45  # Find correct globus for platform  # Find correct globus for platform
46  case "$platform" in  case "$platform" in
47      RH4_32)      RH4_32)
# Line 60  esac Line 79  esac
79  # Convenience functions  # Convenience functions
80  ##############################################################################  ##############################################################################
81    
82  # Print function for results:  # Function which is used to create the dependency checking functions.
83  # $1 - name of component  # arguments:
84  # $2 - result of component  # $1    - target
85  print_result()  {  # $2... - dependencies
86      case "$2" in  setdeps()   {
87          -1) result="MISSING DEPS" ;;      if [ $# -eq 0 ];then
88          0)  result="SUCCESS" ;;          echo "Error: $0 needs at least one argument." >&2
89          1)  result="FAILED" ;;          return $RC_FAILED
90          *)  result="UNKNOWN" ;;      fi
91      esac  
92      printf "%-30s: %s\n" "$1" "$result" >&2      # target
93        target=$1; shift
94        known_targets="$known_targets $target"
95        
96        eval rc_$target=$RC_SKIPPED
97    
98        depstring=""
99        # Only when we DO want dependency checking...
100        if [ $DEPEND -eq 1 ];then
101            while [ $# -gt 0 ];do
102                depstring="$depstring \$rc_$1 -lt \$RC_FAILED"
103                shift
104                if [ $# -gt 0 ];then
105                    depstring="$depstring -a"
106                fi
107            done
108        fi
109    
110        # define the dep_ function
111        if [ -n "$depstring" ];then
112            eval "dep_$target()   {
113                if [ $depstring ];then
114                    $target
115                    rc_$target=\$?
116                else
117                    rc_$target=\$RC_MISSDEP
118                fi
119            }"
120        else
121            eval "dep_$target()   {
122                $target
123                rc_$target=\$?
124            }"
125        fi
126  }  }
127    
128  # cvs checkout wrapper: a wget + untar is much faster than anonymous cvs  # cvs checkout wrapper: a wget + untar is much faster than anonymous cvs
# Line 83  cvsget()    { Line 135  cvsget()    {
135      else      else
136          echo "Syntax error in $0 function" >&2          echo "Syntax error in $0 function" >&2
137          echo "Usage: $0 <component> [tar]" >&2          echo "Usage: $0 <component> [tar]" >&2
138          return 1          return $RC_FAILED
139      fi      fi
140      # Retrieve tarball and untar on the fly      # Retrieve tarball and untar on the fly
141      wget -nv -O - $url | tar -zvxf - || return 1      wget -nv -O - $url | tar -zvxf - || return $RC_FAILED
142      return 0      return $RC_SUCCESS
143    }
144    
145    # Print function for results:
146    # $1 - name of component, result is in $rc_<name of component>
147    print_result()  {
148        tool=$1
149        eval rc=\$rc_$tool
150        if [ "$rc" = "$RC_SKIPPED" ];then
151            return
152        fi
153        case "$rc" in
154            $RC_SUCCESS)    result="SUCCESS" ;;
155            $RC_MISSDEP)    result="MISSING DEPS" ;;
156            $RC_FAILED)     result="FAILED" ;;
157            *)              result="UNKNOWN: $rc" ;;
158        esac
159        printf "%-30s: %s\n" "$tool" "$result" >&2
160    }
161    
162    # Prints usage message
163    usage() {
164        echo "Usage: `basename $0` [options] [targets]"
165        echo
166        echo "Options:"
167        echo " -c   don't check dependencies"
168        echo " -h   show this helptext"
169        echo
170        echo "Notes:"
171        echo "1. when no targets are specified, build all known targets (see below)."
172        echo "2. targets are build in specified order."
173        echo "3. when checking dependencies, only dependencies which are actually "
174        echo "   being build will be checked"
175        echo
176        echo "Known targets:"
177        for target in $known_targets;do
178            echo " $target"
179        done
180        return $RC_SUCCESS
181  }  }
182    
183  ##############################################################################  ##############################################################################
# Line 106  globus()    { Line 196  globus()    {
196      find -type f -name \*.la|while read file;do      find -type f -name \*.la|while read file;do
197          sed s+/opt/globus+${globus}+g ${file} > ${file}.new && \          sed s+/opt/globus+${globus}+g ${file} > ${file}.new && \
198              mv -f ${file}.new ${file}              mv -f ${file}.new ${file}
199      done || return 1      done || return $RC_FAILED
200      return 0      return $RC_SUCCESS
201  }  }
202    
203  # VOMS: (C & C++ API only)  # VOMS: (C & C++ API only)
# Line 118  voms() { Line 208  voms() {
208      ./configure --prefix=${prefix} --with-globus-prefix=${globus} \      ./configure --prefix=${prefix} --with-globus-prefix=${globus} \
209                  --disable-java --with-api-only && \                  --disable-java --with-api-only && \
210      make && \      make && \
211      make install || return 1      make install || return $RC_FAILED
212      return 0      return $RC_SUCCESS
213  }  }
214    
215  # BUILD COMMON-CPP:  # BUILD COMMON-CPP:
216  build_common_cpp()  {  common_cpp()  {
217      cd ${source}      cd ${source}
218  #    cvsget org.glite.build.common-cpp glite-build-common-cpp_R_3_2_8_1 || return 1      cvsget org.glite.build.common-cpp || return $RC_FAILED
219      cvsget org.glite.build.common-cpp || return 1      return $RC_SUCCESS
     return 0  
220  }  }
221    
222  # LCMAPS:  # LCMAPS:
# Line 135  lcmaps()    { Line 224  lcmaps()    {
224      cd ${source}      cd ${source}
225      cvsget org.glite.security.lcmaps && \      cvsget org.glite.security.lcmaps && \
226      cd org.glite.security.lcmaps && \      cd org.glite.security.lcmaps && \
227      cp -p ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project && \
228      ./bootstrap && \      ./bootstrap && \
229      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
230                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
231                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
232                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
233      make && \      make && \
234      make install || return 1      make install || return $RC_FAILED
235      return 0      return $RC_SUCCESS
236  }  }
237    
238  # LCAS:  # LCAS:
# Line 151  lcas() { Line 240  lcas() {
240      cd ${source}      cd ${source}
241      cvsget org.glite.security.lcas && \      cvsget org.glite.security.lcas && \
242      cd org.glite.security.lcas && \      cd org.glite.security.lcas && \
243      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \
244      ./bootstrap && \      ./bootstrap && \
245      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
246                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
247                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
248                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
249      make && \      make && \
250      make install || return 1      make install || return $RC_FAILED
251      return 0      return $RC_SUCCESS
252  }  }
253    
254  # LCAS-INTERFACE:  # LCAS-INTERFACE:
# Line 167  lcas_interface()    { Line 256  lcas_interface()    {
256      cd ${source}      cd ${source}
257      cvsget org.glite.security.lcas-interface && \      cvsget org.glite.security.lcas-interface && \
258      cd org.glite.security.lcas-interface && \      cd org.glite.security.lcas-interface && \
259      cp -p ../org.glite.build.common-cpp/m4/glite.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/glite.m4 ./project && \
260      ./bootstrap && \      ./bootstrap && \
261      ./configure --prefix=${prefix} && \      ./configure --prefix=${prefix} && \
262      make install || return 1      make install || return $RC_FAILED
263      return 0      return $RC_SUCCESS
264  }  }
265    
266  # GLEXEC: extra LDFLAG needed (only) for certain platforms, incl Debian-5 64  # GLEXEC: extra LDFLAG needed (only) for certain platforms, incl Debian-5 64
# Line 179  glexec()    { Line 268  glexec()    {
268      cd ${source}      cd ${source}
269      cvsget org.glite.security.glexec && \      cvsget org.glite.security.glexec && \
270      cd org.glite.security.glexec && \      cd org.glite.security.glexec && \
271      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \
272      ./bootstrap && \      ./bootstrap && \
273      LDFLAGS="-Wl,-rpath -Wl,${globus}/lib" \      LDFLAGS="-Wl,-rpath -Wl,${globus}/lib" \
274          ./configure --prefix=${prefix} \          ./configure --prefix=${prefix} \
# Line 188  glexec()    { Line 277  glexec()    {
277                      --with-globus-thr-flavor=${globus_flav}pthr \                      --with-globus-thr-flavor=${globus_flav}pthr \
278                      --with-globus-nothr-flavor=${globus_flav} && \                      --with-globus-nothr-flavor=${globus_flav} && \
279      make && \      make && \
280      make install || return 1      make install || return $RC_FAILED
281      return 0      return $RC_SUCCESS
282  }  }
283    
284  # LCMAPS PLUGINS BASIC:  # LCMAPS PLUGINS BASIC:
# Line 197  lcmaps_plugins_basic() { Line 286  lcmaps_plugins_basic() {
286      cd ${source}      cd ${source}
287      cvsget org.glite.security.lcmaps-plugins-basic && \      cvsget org.glite.security.lcmaps-plugins-basic && \
288      cd org.glite.security.lcmaps-plugins-basic && \      cd org.glite.security.lcmaps-plugins-basic && \
289      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps,gridlist}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps,gridlist}.m4 ./project && \
290      ./bootstrap && \      ./bootstrap && \
291      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
292                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
293                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
294                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
295      make && \      make && \
296      make install || return 1      make install || return $RC_FAILED
297      return 0      return $RC_SUCCESS
298  }  }
299    
300  # LCMAPS PLUGINS VERIFY-PROXY:  # LCMAPS PLUGINS VERIFY-PROXY:
# Line 213  lcmaps_plugins_verify_proxy()  { Line 302  lcmaps_plugins_verify_proxy()  {
302      cd ${source}      cd ${source}
303      cvsget org.glite.security.lcmaps-plugins-verify-proxy && \      cvsget org.glite.security.lcmaps-plugins-verify-proxy && \
304      cd org.glite.security.lcmaps-plugins-verify-proxy && \      cd org.glite.security.lcmaps-plugins-verify-proxy && \
305      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project && \
306      ./bootstrap && \      ./bootstrap && \
307      ./configure --prefix=${prefix} --with-glite-location=${glite} && \      ./configure --prefix=${prefix} --with-glite-location=${glite} && \
308      make && \      make && \
309      make install || return 1      make install || return $RC_FAILED
310      return 0      return $RC_SUCCESS
311  }  }
312    
313  # LCMAPS PLUGINS VOMS:  # LCMAPS PLUGINS VOMS:
# Line 226  lcmaps_plugins_voms()  { Line 315  lcmaps_plugins_voms()  {
315      cd ${source}      cd ${source}
316      cvsget org.glite.security.lcmaps-plugins-voms && \      cvsget org.glite.security.lcmaps-plugins-voms && \
317      cd org.glite.security.lcmaps-plugins-voms && \      cd org.glite.security.lcmaps-plugins-voms && \
318      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,lcmaps,gridlist}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,lcmaps,gridlist}.m4 ./project && \
319      ./bootstrap && \      ./bootstrap && \
320      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
321                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
322                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
323                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
324      make && \      make && \
325      make install || return 1      make install || return $RC_FAILED
326      return 0      return $RC_SUCCESS
327  }  }
328    
329  # LCMAPS PLUGINS AFS:  # LCMAPS PLUGINS AFS:
# Line 242  lcmaps_plugins_afs()   { Line 331  lcmaps_plugins_afs()   {
331      cd ${source}      cd ${source}
332      cvsget org.glite.security.lcmaps-plugins-afs && \      cvsget org.glite.security.lcmaps-plugins-afs && \
333      cd org.glite.security.lcmaps-plugins-afs && \      cd org.glite.security.lcmaps-plugins-afs && \
334      cp -p ../org.glite.build.common-cpp/m4/{glite,globus}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus}.m4 ./project && \
335      ./bootstrap && \      ./bootstrap && \
336      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
337                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
338                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
339                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
340      make && \      make && \
341      make install || return 1      make install || return $RC_FAILED
342      return 0      return $RC_SUCCESS
343  }  }
344    
345  # LCMAPS PLUGINS GUMS:  # LCMAPS PLUGINS GUMS:
# Line 258  lcmaps_plugins_gums()  { Line 347  lcmaps_plugins_gums()  {
347      cd ${source}      cd ${source}
348      cvsget org.glite.security.lcmaps-plugins-gums && \      cvsget org.glite.security.lcmaps-plugins-gums && \
349      cd org.glite.security.lcmaps-plugins-gums && \      cd org.glite.security.lcmaps-plugins-gums && \
350      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security,globus}.m4 ./project && \
351      ./bootstrap && \      ./bootstrap && \
352      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
353                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
354                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
355                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
356      make && \      make && \
357      make install || return 1      make install || return $RC_FAILED
358      return 0      return $RC_SUCCESS
359  }  }
360    
361  # PEP-C LIB: Will install in same libdir as LCMAPS  # PEP-C LIB: Will install in same libdir as LCMAPS
# Line 282  pep_c_lib() { Line 371  pep_c_lib() {
371      ./configure --prefix=${glite} --libdir=${pepclibdir} && \      ./configure --prefix=${glite} --libdir=${pepclibdir} && \
372      make && \      make && \
373      make html && \      make html && \
374      make install || return 1      make install || return $RC_FAILED
375      return 0      return $RC_SUCCESS
376  }  }
377    
378  # LCMAPS PLUGINS C-PEP  # LCMAPS PLUGINS C-PEP
# Line 291  lcmaps_plugins_c_pep() { Line 380  lcmaps_plugins_c_pep() {
380      cd ${source}      cd ${source}
381      cvsget org.glite.security.lcmaps-plugins-c-pep && \      cvsget org.glite.security.lcmaps-plugins-c-pep && \
382      cd org.glite.security.lcmaps-plugins-c-pep && \      cd org.glite.security.lcmaps-plugins-c-pep && \
383      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project && \
384      ./bootstrap && \      ./bootstrap && \
385      ./configure --prefix=${glite} --with-glite-location=${glite} && \      ./configure --prefix=${glite} --with-glite-location=${glite} && \
386      make && \      make && \
387      make install || return 1      make install || return $RC_FAILED
388      return 0      return $RC_SUCCESS
389  }  }
390    
391  # SAML2XACML2 LIB:  # SAML2XACML2 LIB:
# Line 304  saml2_xacml2_c_lib()   { Line 393  saml2_xacml2_c_lib()   {
393      cd ${source}      cd ${source}
394      cvsget org.glite.security.saml2-xacml2-c-lib && \      cvsget org.glite.security.saml2-xacml2-c-lib && \
395      cd org.glite.security.saml2-xacml2-c-lib && \      cd org.glite.security.saml2-xacml2-c-lib && \
396      cp -v -p ../org.glite.build.common-cpp/m4/glite.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/glite.m4 ./project && \
397      export CXXFLAGS=-fPIC && \      export CXXFLAGS=-fPIC && \
398      cd gsoap-2.7 && \      cd gsoap-2.7 && \
399      ../autogen.sh && \      ../autogen.sh && \
# Line 315  saml2_xacml2_c_lib()   { Line 404  saml2_xacml2_c_lib()   {
404      ../autogen.sh && \      ../autogen.sh && \
405      ./configure --prefix=${glite} --with-gsoap=${glite} && \      ./configure --prefix=${glite} --with-gsoap=${glite} && \
406      make && \      make && \
407      make install || return 1      make install || return $RC_FAILED
408      return 0      return $RC_SUCCESS
409  }  }
410    
411  # LCMAPS PLUGINS SCAS CLIENT:  # LCMAPS PLUGINS SCAS CLIENT:
# Line 324  lcmaps_plugins_scas_client()   { Line 413  lcmaps_plugins_scas_client()   {
413      cd ${source}      cd ${source}
414      cvsget org.glite.security.lcmaps-plugins-scas-client && \      cvsget org.glite.security.lcmaps-plugins-scas-client && \
415      cd org.glite.security.lcmaps-plugins-scas-client && \      cd org.glite.security.lcmaps-plugins-scas-client && \
416      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security,lcmaps}.m4 ./project && \
417      ./bootstrap && \      ./bootstrap && \
418      ./configure --prefix=${glite} --with-glite-location=${glite} && \      ./configure --prefix=${glite} --with-glite-location=${glite} && \
419      make && \      make && \
420      make install || return 1      make install || return $RC_FAILED
421      return 0      return $RC_SUCCESS
422  }  }
423    
424  # SCAS  # SCAS
# Line 337  scas() { Line 426  scas() {
426      cd ${source}      cd ${source}
427      cvsget org.glite.security.scas && \      cvsget org.glite.security.scas && \
428      cd org.glite.security.scas && \      cd org.glite.security.scas && \
429      cp -p ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project && \
430      ./bootstrap && \      ./bootstrap && \
431      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
432                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
433                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
434                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
435      make && \      make && \
436      make install || return 1      make install || return $RC_FAILED
437      return 0      return $RC_SUCCESS
438  }  }
439    
440  # LCAS PLUGINS BASIC:  # LCAS PLUGINS BASIC:
# Line 353  lcas_plugins_basic()   { Line 442  lcas_plugins_basic()   {
442      cd ${source}      cd ${source}
443      cvsget org.glite.security.lcas-plugins-basic && \      cvsget org.glite.security.lcas-plugins-basic && \
444      cd org.glite.security.lcas-plugins-basic && \      cd org.glite.security.lcas-plugins-basic && \
445      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project && \
446      ./bootstrap && \      ./bootstrap && \
447      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
448                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
449                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
450                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
451      make && \      make && \
452      make install || return 1      make install || return $RC_FAILED
453      return 0      return $RC_SUCCESS
454  }  }
455    
456  # LCAS PLUGINS CHECK-EXECUTABLE:  # LCAS PLUGINS CHECK-EXECUTABLE:
# Line 369  lcas_plugins_check_executable()        { Line 458  lcas_plugins_check_executable()        {
458      cd ${source}      cd ${source}
459      cvsget org.glite.security.lcas-plugins-check-executable && \      cvsget org.glite.security.lcas-plugins-check-executable && \
460      cd org.glite.security.lcas-plugins-check-executable && \      cd org.glite.security.lcas-plugins-check-executable && \
461      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project && \
462      ./bootstrap && \      ./bootstrap && \
463      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
464                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
465                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
466                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
467      make && \      make && \
468      make install || return 1      make install || return $RC_FAILED
469      return 0      return $RC_SUCCESS
470  }  }
471    
472  # GRIDSITE CORE:  # GRIDSITE CORE:
# Line 390  gridsite_core()        { Line 479  gridsite_core()        {
479      cvsget org.gridsite.core && \      cvsget org.gridsite.core && \
480      cd org.gridsite.core/src && \      cd org.gridsite.core/src && \
481      make prefix=${gridsite} libdir=${gridsitelibdir} && \      make prefix=${gridsite} libdir=${gridsitelibdir} && \
482      make prefix=${gridsite} install || return 1      make prefix=${gridsite} install || return $RC_FAILED
483      return 0      return $RC_SUCCESS
484  }  }
485    
486  # LCAS PLUGINS VOMS:  # LCAS PLUGINS VOMS:
# Line 399  lcas_plugins_voms() { Line 488  lcas_plugins_voms() {
488      cd ${source}      cd ${source}
489      cvsget org.glite.security.lcas-plugins-voms && \      cvsget org.glite.security.lcas-plugins-voms && \
490      cd org.glite.security.lcas-plugins-voms && \      cd org.glite.security.lcas-plugins-voms && \
491      cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,gridsite,gridlist}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,gridsite,gridlist}.m4 ./project && \
492      ./bootstrap && \      ./bootstrap && \
493      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
494                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
# Line 408  lcas_plugins_voms() { Line 497  lcas_plugins_voms() {
497                  --with-gridsite-prefix=${gridsite} \                  --with-gridsite-prefix=${gridsite} \
498                  --with-gridsite-ssl=system && \                  --with-gridsite-ssl=system && \
499      make && \      make && \
500      make install || return 1      make install || return $RC_FAILED
501      return 0      return $RC_SUCCESS
502  }  }
503    
504  # LCAS-LCMAPS GT4 interface:  # LCAS-LCMAPS GT4 interface:
# Line 417  lcas_lcmaps_gt4_interface()    { Line 506  lcas_lcmaps_gt4_interface()    {
506      cd ${source}      cd ${source}
507      cvsget org.glite.security.lcas-lcmaps-gt4-interface && \      cvsget org.glite.security.lcas-lcmaps-gt4-interface && \
508      cd org.glite.security.lcas-lcmaps-gt4-interface && \      cd org.glite.security.lcas-lcmaps-gt4-interface && \
509      cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project && \
510      ./bootstrap && \      ./bootstrap && \
511      ./configure --prefix=${prefix} \      ./configure --prefix=${prefix} \
512                  --with-glite-location=${glite} \                  --with-glite-location=${glite} \
# Line 425  lcas_lcmaps_gt4_interface()    { Line 514  lcas_lcmaps_gt4_interface()    {
514                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
515                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
516      make && \      make && \
517      make install || return 1      make install || return $RC_FAILED
518      return 0      return $RC_SUCCESS
519  }  }
520    
521  ##############################################################################  ##############################################################################
522  #  #
523  # Build all tools, taking care of dependencies, first create source directory.  # Define all dependency functions, NOTE: the order of the setdeps statements is
524    # important!
525  #  #
526  ##############################################################################  ##############################################################################
527    
 mkdir -p ${source} || {  
     echo "Creating of ${source} FAILED" >&2  
     exit 1 # Fatal...  
 }  
   
528  # GLOBUS: no dependencies  # GLOBUS: no dependencies
529  globus  setdeps globus
 rc_globus=$?  
530    
531  # BUILD COMMON-CPP: no dependencies  # BUILD COMMON-CPP: no dependencies
532  build_common_cpp  setdeps common_cpp
 rc_macros=$?  
533    
534  # VOMS: depends globus  # VOMS: depends globus
535  if [ $rc_globus -eq 0 ];then  setdeps voms globus
     voms  
     rc_voms=$?  
 else  
     rc_voms=-1  
 fi  
536    
537  # LCMAPS: depends globus, voms, common-cpp  # LCMAPS: depends globus, voms, common-cpp
538  if [ $rc_globus -eq 0 -a $rc_voms -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps globus voms common_cpp
     lcmaps  
     rc_lcmaps=$?  
 else  
     rc_lcmaps=-1  
 fi  
539    
540  # LCAS: depends globus, common-cpp  # LCAS: depends globus, common-cpp
541  if [ $rc_globus -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcas globus common_cpp
     lcas  
     rc_lcas=$?  
 else  
     rc_lcas=-1  
 fi  
542    
543  # LCAS-INTERFACE: depends common-cpp  # LCAS-INTERFACE: depends common-cpp
544  if [ $rc_macros -eq 0 ];then  setdeps lcas_interface common_cpp
     lcas_interface  
     rc_lcas_interface=$?  
 else  
     rc_lcas_interface=-1  
 fi  
545    
546  # GLEXEC: depends globus, lcmaps, common-cpp, lcas, lcas-interface  # GLEXEC: depends globus, lcmaps, common-cpp, lcas, lcas-interface
547  if [ $rc_globus -eq 0 -a $rc_lcmaps -eq 0 -a $rc_macros -eq 0 -a \  setdeps glexec globus lcmaps common_cpp lcas lcas_interface
      $rc_lcas -eq 0 -a $rc_lcas_interface -eq 0 ];then  
     glexec  
     rc_glexec=$?  
 else  
     rc_glexec=-1  
 fi  
548    
549  # LCMAPS PLUGINS BASIC: depends globus, lcmaps, common-cpp  # LCMAPS PLUGINS BASIC: depends globus, lcmaps, common-cpp
550  if [ $rc_globus -eq 0 -a $rc_lcmaps -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_basic globus lcmaps common_cpp
     lcmaps_plugins_basic  
     rc_lcmaps_plugins_basic=$?  
 else  
     rc_lcmaps_plugins_basic=-1  
 fi  
551    
552  # LCMAPS PLUGINS VERIFY-PROXY: depends lcmaps, common-cpp  # LCMAPS PLUGINS VERIFY-PROXY: depends lcmaps, common-cpp
553  if [ $rc_lcmaps -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_verify_proxy lcmaps common_cpp
     lcmaps_plugins_verify_proxy  
     rc_lcmaps_plugins_verify_proxy=$?  
 else  
     rc_lcmaps_plugins_verify_proxy=-1  
 fi  
554    
555  # LCMAPS PLUGINS VOMS: depends globus, voms, lcmaps, common-cpp  # LCMAPS PLUGINS VOMS: depends globus, voms, lcmaps, common-cpp
556  if [ $rc_globus -eq 0 -a $rc_voms -eq 0 -a $rc_lcmaps -eq 0 -a \  setdeps lcmaps_plugins_voms globus voms lcmaps common_cpp
      $rc_macros -eq 0 ];then  
     lcmaps_plugins_voms  
     rc_lcmaps_plugins_voms=$?  
 else  
     rc_lcmaps_plugins_voms=-1  
 fi  
557    
558  # LCMAPS PLUGINS AFS: depends lcmaps, common-cpp  # LCMAPS PLUGINS AFS: depends lcmaps, common-cpp
559  if [ $rc_lcmaps -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_afs lcmaps common_cpp
     lcmaps_plugins_afs  
     rc_lcmaps_plugins_afs=$?  
 else  
     rc_lcmaps_plugins_afs=-1  
 fi  
560    
561  # LCMAPS PLUGINS GUMS: depends lcmaps, common-cpp  # LCMAPS PLUGINS GUMS: depends lcmaps, common-cpp
562  if [ $rc_lcmaps -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_gums lcmaps common_cpp
     lcmaps_plugins_gums  
     rc_lcmaps_plugins_gums=$?  
 else  
     rc_lcmaps_plugins_gums=-1  
 fi  
563    
564  # PEP-C LIB: Not dependent on LCMAPS, but need to install it in right place  # PEP-C LIB: Not dependent on LCMAPS, but need to install it in right place
565  if [ $rc_lcmaps -eq 0 ];then  setdeps pep_c_lib lcmaps
     pep_c_lib  
     rc_pep_c_lib=$?  
 else  
     rc_pep_c_lib=-1  
 fi  
566    
567  # LCMAPS PLUGINS C-PEP: depends lcmaps, pep-c lib, common-cpp  # LCMAPS PLUGINS C-PEP: depends lcmaps, pep-c lib, common-cpp
568  if [ $rc_lcmaps -eq 0 -a $rc_pep_c_lib -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_c_pep lcmaps pep_c_lib common_cpp
     lcmaps_plugins_c_pep  
     rc_lcmaps_plugins_c_pep=$?  
 else  
     rc_lcmaps_plugins_c_pep=-1  
 fi  
569    
570  # SAML2XACML2 LIB: depends common-cpp  # SAML2XACML2 LIB: depends common-cpp
571  if [ $rc_macros -eq 0 ];then  setdeps saml2_xacml2_c_lib common_cpp
     saml2_xacml2_c_lib  
     rc_saml2_xacml2_c_lib=$?  
 else  
     rc_saml2_xacml2_c_lib=-1  
 fi  
572    
573  # LCMAPS PLUGINS SCAS CLIENT: depends saml2-xacml2-c-lib, common-cpp  # LCMAPS PLUGINS SCAS CLIENT: depends saml2-xacml2-c-lib, common-cpp
574  if [ $rc_lcmaps -eq 0 -a $rc_saml2_xacml2_c_lib -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcmaps_plugins_scas_client saml2_xacml2_c_lib common_cpp
     lcmaps_plugins_scas_client  
     rc_lcmaps_plugins_scas_client=$?  
 else  
     rc_lcmaps_plugins_scas_client=-1  
 fi  
575    
576  # SCAS: depends saml2-xacml2-c-lib, common-cpp, lcmaps  # SCAS: depends saml2-xacml2-c-lib, common-cpp, lcmaps
577  if [ $rc_lcmaps -eq 0 -a $rc_saml2_xacml2_c_lib -eq 0 -a $rc_macros -eq 0 ];then  setdeps scas saml2_xacml2_c_lib common_cpp lcmaps
     scas  
     rc_scas=$?  
 else  
     rc_scas=-1  
 fi  
578    
579  # LCAS PLUGINS BASIC: depends globus, lcas, common-cpp  # LCAS PLUGINS BASIC: depends globus, lcas, common-cpp
580  if [ $rc_globus -eq 0 -a $rc_lcas -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcas_plugins_basic globus lcas common_cpp
     lcas_plugins_basic  
     rc_lcas_plugins_basic=$?  
 else  
     rc_lcas_plugins_basic=-1  
 fi  
581    
582  # LCAS PLUGINS CHECK-EXECUTABLE: depends globus, lcas, common-cpp  # LCAS PLUGINS CHECK-EXECUTABLE: depends globus, lcas, common-cpp
583  if [ $rc_globus -eq 0 -a $rc_lcas -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcas_plugins_check_executable globus lcas common_cpp
     lcas_plugins_check_executable  
     rc_lcas_plugins_check_executable=$?  
 else  
     rc_lcas_plugins_check_executable=-1  
 fi  
584    
585  # GRIDSITE Core:  # GRIDSITE Core:
586  gridsite_core  setdeps gridsite_core
 rc_gridsite_core=$?  
587    
588  # LCAS PLUGINS VOMS: depends globus, voms, lcas, common-cpp, gridsite  # LCAS PLUGINS VOMS: depends globus, voms, lcas, common-cpp, gridsite
589  if [ $rc_globus -eq 0 -a $rc_voms -eq 0 -a \  setdeps lcas_plugins_voms globus voms lcas common_cpp gridsite_core
      $rc_lcas -eq 0 -a $rc_macros -eq 0 -a $rc_gridsite_core -eq 0 ];then  
     lcas_plugins_voms  
     rc_lcas_plugins_voms=$?  
 else  
     rc_lcas_plugins_voms=-1  
 fi  
590    
591  # LCAS-LCMAPS GT4 interface: depends globus, lcmaps, common-cpp, lcas, lcas-interface  # LCAS-LCMAPS GT4 interface: depends globus, lcmaps, common-cpp, lcas, lcas-interface
592  if [ $rc_globus -eq 0 -a $rc_lcmaps -eq 0 -a $rc_macros -eq 0 -a \  setdeps lcas_lcmaps_gt4_interface globus lcmaps common_cpp lcas lcas_interface
      $rc_lcas -eq 0 -a $rc_lcas_interface -eq 0 ];then  
     lcas_lcmaps_gt4_interface  
     rc_lcas_lcmaps_gt4_interface=$?  
 else  
     rc_lcas_lcmaps_gt4_interface=-1  
 fi  
   
593    
594  ##############################################################################  ##############################################################################
595  #  #
596  # Print results  # Build all tools, taking care of dependencies
597  #  #
598  ##############################################################################  ##############################################################################
599    
600  print_result "GLOBUS"                           $rc_globus  # Now that we know all the targets, we can print usage if requested
601  print_result "BUILD-COMMON-CPP"                 $rc_macros  if [ "$USAGE" -eq 1 ];then
602  print_result "VOMS"                             $rc_voms      usage
603  print_result "LCMAPS"                           $rc_lcmaps      exit 0
604  print_result "LCAS"                             $rc_lcas  fi
605  print_result "LCAS interface"                   $rc_lcas_interface  
606  print_result "gLExec"                           $rc_glexec  # Figure out the build targets
607  print_result "LCMAPS plugins-basic"             $rc_lcmaps_plugins_basic  build_targets=""
608  print_result "LCMAPS plugins-verify-proxy"      $rc_lcmaps_plugins_verify_proxy  # If none specified, use all
609  print_result "LCMAPS plugins-voms"              $rc_lcmaps_plugins_voms  if [ -z "$targets" ];then
610  print_result "LCMAPS plugins-afs"               $rc_lcmaps_plugins_afs      build_targets=$known_targets
611  print_result "LCMAPS plugins-gums"              $rc_lcmaps_plugins_gums  else
612  print_result "PEP-C Library"                    $rc_pep_c_lib      for target in $targets;do
613  print_result "LCMAPS plugins-c-pep"             $rc_lcmaps_plugins_c_pep          echo $known_targets|tr ' ' '\n'|grep -q "^$target$" && \
614  print_result "SAML2-XACML2 C-library"           $rc_saml2_xacml2_c_lib              build_targets="$build_targets $target" || \
615  print_result "LCMAPS plugins-scas-client"       $rc_lcmaps_plugins_scas_client              echo "Skipping unknown target \"$target\"" >&2
616  print_result "SCAS"                             $rc_scas      done
617  print_result "LCAS plugins-basic"               $rc_lcas_plugins_basic  fi
618  print_result "LCAS plugins-check-executable"    $rc_lcas_plugins_check_executable  
619  print_result "GridSite core"                    $rc_gridsite_core  # Anything to be done?
620  print_result "LCAS plugins-voms"                $rc_lcas_plugins_voms  if [ -n "$build_targets" ];then
621  print_result "LCAS-LCMAPS GT4-interface"        $rc_lcas_lcmaps_gt4_interface      # create the source dir
622        mkdir -p ${source} || {
623            echo "Creating of ${source} FAILED" >&2
624            exit 1 # Fatal...
625        }
626    
627        # Do the builds
628        for target in $build_targets;do
629            eval dep_$target
630        done
631    
632        # Print results
633        for target in $known_targets;do
634            print_result $target
635        done
636    fi
637    

Legend:
Removed from v.1820  
changed lines
  Added in v.1821

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28