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

Diff of /trunk/grid-mw-security/glexec/util/glexec_from_source/glexec_globus_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 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
24  export globus_flav=unset  export globus_flav=unset
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  ##############################################################################  ##############################################################################
46  # Convenience functions  # Convenience functions
47  ##############################################################################  ##############################################################################
48    
49  # Print function for results:  # Function which is used to create the dependency checking functions.
50  # $1 - name of component  # arguments:
51  # $2 - result of component  # $1    - target
52  print_result()  {  # $2... - dependencies
53      case "$2" in  setdeps()   {
54          -1) result="MISSING DEPS" ;;      if [ $# -eq 0 ];then
55          0)  result="SUCCESS" ;;          echo "Error: $0 needs at least one argument." >&2
56          1)  result="FAILED" ;;          return 1
57          *)  result="UNKNOWN" ;;      fi
58      esac  
59      printf "%-30s: %s\n" "$1" "$result" >&2      # target
60        target=$1; shift
61        known_targets="$known_targets $target"
62        
63        eval rc_$target=$RC_SKIPPED
64    
65        depstring=""
66        # Only when we DO want dependency checking...
67        if [ $DEPEND -eq 1 ];then
68            while [ $# -gt 0 ];do
69                depstring="$depstring \$rc_$1 -lt \$RC_FAILED"
70                shift
71                if [ $# -gt 0 ];then
72                    depstring="$depstring -a"
73                fi
74            done
75        fi
76    
77        # define the dep_ function
78        if [ -n "$depstring" ];then
79            eval "dep_$target()   {
80                if [ $depstring ];then
81                    $target
82                    rc_$target=\$?
83                else
84                    rc_$target=\$RC_MISSDEP
85                fi
86            }"
87        else
88            eval "dep_$target()   {
89                $target
90                rc_$target=\$?
91            }"
92        fi
93  }  }
94    
95  # 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 50  cvsget()    { Line 102  cvsget()    {
102      else      else
103          echo "Syntax error in $0 function" >&2          echo "Syntax error in $0 function" >&2
104          echo "Usage: $0 <component> [tar]" >&2          echo "Usage: $0 <component> [tar]" >&2
105          return 1          return $RC_FAILED
106      fi      fi
107      # Retrieve tarball and untar on the fly      # Retrieve tarball and untar on the fly
108      wget -nv -O - $url | tar -zvxf - || return 1      wget -nv -O - $url | tar -zvxf - || return 1
109      return 0      return 0
110  }  }
111    
112    # Print function for results:
113    # $1 - name of component, result is in $rc_<name of component>
114    print_result()  {
115        tool=$1
116        eval rc=\$rc_$tool
117        if [ "$rc" = "$RC_SKIPPED" ];then
118            return
119        fi
120        case "$rc" in
121            $RC_SUCCESS)    result="SUCCESS" ;;
122            $RC_MISSDEP)    result="MISSING DEPS" ;;
123            $RC_FAILED)     result="FAILED" ;;
124            *)              result="UNKNOWN: $rc" ;;
125        esac
126        printf "%-30s: %s\n" "$tool" "$result" >&2
127    }
128    
129    # Prints usage message
130    usage() {
131        echo "Usage: `basename $0` [options] [targets]"
132        echo
133        echo "Options:"
134        echo " -c   don't check dependencies"
135        echo " -h   show this helptext"
136        echo
137        echo "Notes:"
138        echo "1. when no targets are specified, build all known targets (see below)."
139        echo "2. targets are build in specified order."
140        echo "3. when checking dependencies, only dependencies which are actually "
141        echo "   being build will be checked"
142        echo
143        echo "Known targets:"
144        for target in $known_targets;do
145            echo " $target"
146        done
147        return 0
148    }
149    
150  ##############################################################################  ##############################################################################
151  #  #
152  # Define all building functions  # Define all building functions
# Line 88  globus()    { Line 178  globus()    {
178                  --disable-wsmds --disable-wsdel --disable-wsrft --disable-wscas \                  --disable-wsmds --disable-wsdel --disable-wsrft --disable-wscas \
179                  --disable-wstests --disable-webmds && \                  --disable-wstests --disable-webmds && \
180      make globus-gsi globus_gridmap_callout_error globus_authz && \      make globus-gsi globus_gridmap_callout_error globus_authz && \
181      make install || return 1      make install || return $RC_FAILED
182    
183        # (re)evaluate globus flavour
184        globus_flavour
185        if [ $? -eq $RC_FAILED ];then
186            echo "ERROR: Cannot determine globus flavour." >&2
187            echo " Check ${globus}/etc/globus_core/*.gpt" >&2
188            return $RC_FAILED
189        fi
190        return $RC_SUCCESS
191    }
192    
193    globus_flavour()    {
194      # Set correct globus flavour:      # Set correct globus flavour:
195      if [ -f "${globus}/etc/globus_core/flavor_gcc64dbg.gpt" ];then      if [ -f "${globus}/etc/globus_core/flavor_gcc64dbg.gpt" ];then
196          globus_flav=gcc64dbg          globus_flav=gcc64dbg
# Line 100  globus()    { Line 201  globus()    {
201      elif [ -f "${globus}/etc/globus_core/flavor_gcc32.gpt" ];then      elif [ -f "${globus}/etc/globus_core/flavor_gcc32.gpt" ];then
202          globus_flav=gcc32          globus_flav=gcc32
203      else      else
204          echo "ERROR: Cannot determine globus flavour." >&2          return $RC_FAILED
         echo " Check ${globus}/etc/globus_core/*.gpt" >&2  
         return 1  
205      fi      fi
206      return 0      return $RC_SUCCESS
207  }  }
208    
209  # VOMS: (C & C++ API only)  # VOMS: (C & C++ API only)
# Line 115  voms() { Line 214  voms() {
214      ./configure --prefix=${prefix} --with-globus-prefix=${globus} \      ./configure --prefix=${prefix} --with-globus-prefix=${globus} \
215                  --disable-java --with-api-only && \                  --disable-java --with-api-only && \
216      make && \      make && \
217      make install || return 1      make install || return $RC_FAILED
218      return 0      return $RC_SUCCESS
219  }  }
220    
221  # BUILD COMMON-CPP:  # BUILD COMMON-CPP:
222  build_common_cpp()  {  common_cpp()  {
223      cd ${source}      cd ${source}
224  #    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
225      cvsget org.glite.build.common-cpp || return 1      return $RC_SUCCESS
     return 0  
226  }  }
227    
228  # LCMAPS: Note we use the un-threaded flavor for both: only one present  # LCMAPS: Note we use the un-threaded flavor for both: only one present
# Line 132  lcmaps()    { Line 230  lcmaps()    {
230      cd ${source}      cd ${source}
231      cvsget org.glite.security.lcmaps && \      cvsget org.glite.security.lcmaps && \
232      cd org.glite.security.lcmaps && \      cd org.glite.security.lcmaps && \
233      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 && \
234      ./bootstrap && \      ./bootstrap && \
235      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
236                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
237                  --with-globus-thr-flavor=${globus_flav} \                  --with-globus-thr-flavor=${globus_flav} \
238                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
239      make && \      make && \
240      make install || return 1      make install || return $RC_FAILED
241      return 0      return $RC_SUCCESS
242  }  }
243    
244  # LCAS:  # LCAS:
# Line 148  lcas() { Line 246  lcas() {
246      cd ${source}      cd ${source}
247      cvsget org.glite.security.lcas && \      cvsget org.glite.security.lcas && \
248      cd org.glite.security.lcas && \      cd org.glite.security.lcas && \
249      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 && \
250      ./bootstrap && \      ./bootstrap && \
251      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
252                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
253                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
254                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
255      make && \      make && \
256      make install || return 1      make install || return $RC_FAILED
257      return 0      return $RC_SUCCESS
258  }  }
259    
260  # LCAS-INTERFACE:  # LCAS-INTERFACE:
# Line 164  lcas_interface()    { Line 262  lcas_interface()    {
262      cd ${source}      cd ${source}
263      cvsget org.glite.security.lcas-interface && \      cvsget org.glite.security.lcas-interface && \
264      cd org.glite.security.lcas-interface && \      cd org.glite.security.lcas-interface && \
265      cp -p ../org.glite.build.common-cpp/m4/glite.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/glite.m4 ./project && \
266      ./bootstrap && \      ./bootstrap && \
267      ./configure --prefix=${prefix} && \      ./configure --prefix=${prefix} && \
268      make install || return 1      make install || return $RC_FAILED
269      return 0      return $RC_SUCCESS
270  }  }
271    
272  # 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 176  glexec()    { Line 274  glexec()    {
274      cd ${source}      cd ${source}
275      cvsget org.glite.security.glexec && \      cvsget org.glite.security.glexec && \
276      cd org.glite.security.glexec && \      cd org.glite.security.glexec && \
277      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 && \
278      ./bootstrap && \      ./bootstrap && \
279      LDFLAGS="-Wl,-rpath -Wl,${globus}/lib" \      LDFLAGS="-Wl,-rpath -Wl,${globus}/lib" \
280          ./configure --prefix=${prefix} \          ./configure --prefix=${prefix} \
# Line 185  glexec()    { Line 283  glexec()    {
283                      --with-globus-thr-flavor=${globus_flav}pthr \                      --with-globus-thr-flavor=${globus_flav}pthr \
284                      --with-globus-nothr-flavor=${globus_flav} && \                      --with-globus-nothr-flavor=${globus_flav} && \
285      make && \      make && \
286      make install || return 1      make install || return $RC_FAILED
287      return 0      return $RC_SUCCESS
288  }  }
289    
290  # LCMAPS PLUGINS BASIC:  # LCMAPS PLUGINS BASIC:
# Line 194  lcmaps_plugins_basic() { Line 292  lcmaps_plugins_basic() {
292      cd ${source}      cd ${source}
293      cvsget org.glite.security.lcmaps-plugins-basic && \      cvsget org.glite.security.lcmaps-plugins-basic && \
294      cd org.glite.security.lcmaps-plugins-basic && \      cd org.glite.security.lcmaps-plugins-basic && \
295      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 && \
296      ./bootstrap && \      ./bootstrap && \
297      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
298                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
299                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
300                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
301      make && \      make && \
302      make install || return 1      make install || return $RC_FAILED
303      return 0      return $RC_SUCCESS
304  }  }
305    
306  # LCMAPS PLUGINS VERIFY-PROXY:  # LCMAPS PLUGINS VERIFY-PROXY:
# Line 210  lcmaps_plugins_verify_proxy()  { Line 308  lcmaps_plugins_verify_proxy()  {
308      cd ${source}      cd ${source}
309      cvsget org.glite.security.lcmaps-plugins-verify-proxy && \      cvsget org.glite.security.lcmaps-plugins-verify-proxy && \
310      cd org.glite.security.lcmaps-plugins-verify-proxy && \      cd org.glite.security.lcmaps-plugins-verify-proxy && \
311      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 && \
312      ./bootstrap && \      ./bootstrap && \
313      ./configure --prefix=${prefix} --with-glite-location=${glite} && \      ./configure --prefix=${prefix} --with-glite-location=${glite} && \
314      make && \      make && \
315      make install || return 1      make install || return $RC_FAILED
316      return 0      return $RC_SUCCESS
317  }  }
318    
319  # LCMAPS PLUGINS VOMS:  # LCMAPS PLUGINS VOMS:
# Line 223  lcmaps_plugins_voms()  { Line 321  lcmaps_plugins_voms()  {
321      cd ${source}      cd ${source}
322      cvsget org.glite.security.lcmaps-plugins-voms && \      cvsget org.glite.security.lcmaps-plugins-voms && \
323      cd org.glite.security.lcmaps-plugins-voms && \      cd org.glite.security.lcmaps-plugins-voms && \
324      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 && \
325      ./bootstrap && \      ./bootstrap && \
326      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
327                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
328                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
329                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
330      make && \      make && \
331      make install || return 1      make install || return $RC_FAILED
332      return 0      return $RC_SUCCESS
333  }  }
334    
335  # LCMAPS PLUGINS AFS:  # LCMAPS PLUGINS AFS:
# Line 239  lcmaps_plugins_afs()   { Line 337  lcmaps_plugins_afs()   {
337      cd ${source}      cd ${source}
338      cvsget org.glite.security.lcmaps-plugins-afs && \      cvsget org.glite.security.lcmaps-plugins-afs && \
339      cd org.glite.security.lcmaps-plugins-afs && \      cd org.glite.security.lcmaps-plugins-afs && \
340      cp -p ../org.glite.build.common-cpp/m4/{glite,globus}.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/{glite,globus}.m4 ./project && \
341      ./bootstrap && \      ./bootstrap && \
342      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
343                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
344                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
345                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
346      make && \      make && \
347      make install || return 1      make install || return $RC_FAILED
348      return 0      return $RC_SUCCESS
349  }  }
350    
351  # LCMAPS PLUGINS GUMS:  # LCMAPS PLUGINS GUMS:
# Line 255  lcmaps_plugins_gums()  { Line 353  lcmaps_plugins_gums()  {
353      cd ${source}      cd ${source}
354      cvsget org.glite.security.lcmaps-plugins-gums && \      cvsget org.glite.security.lcmaps-plugins-gums && \
355      cd org.glite.security.lcmaps-plugins-gums && \      cd org.glite.security.lcmaps-plugins-gums && \
356      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 && \
357      ./bootstrap && \      ./bootstrap && \
358      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
359                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
360                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
361                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
362      make && \      make && \
363      make install || return 1      make install || return $RC_FAILED
364      return 0      return $RC_SUCCESS
365  }  }
366    
367  # PEP-C LIB: Will install in same libdir as LCMAPS  # PEP-C LIB: Will install in same libdir as LCMAPS
# Line 279  pep_c_lib() { Line 377  pep_c_lib() {
377      ./configure --prefix=${glite} --libdir=${pepclibdir} && \      ./configure --prefix=${glite} --libdir=${pepclibdir} && \
378      make && \      make && \
379      make html && \      make html && \
380      make install || return 1      make install || return $RC_FAILED
381      return 0      return $RC_SUCCESS
382  }  }
383    
384  # LCMAPS PLUGINS C-PEP  # LCMAPS PLUGINS C-PEP
# Line 288  lcmaps_plugins_c_pep() { Line 386  lcmaps_plugins_c_pep() {
386      cd ${source}      cd ${source}
387      cvsget org.glite.security.lcmaps-plugins-c-pep && \      cvsget org.glite.security.lcmaps-plugins-c-pep && \
388      cd org.glite.security.lcmaps-plugins-c-pep && \      cd org.glite.security.lcmaps-plugins-c-pep && \
389      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 && \
390      ./bootstrap && \      ./bootstrap && \
391      ./configure --prefix=${glite} --with-glite-location=${glite} && \      ./configure --prefix=${glite} --with-glite-location=${glite} && \
392      make && \      make && \
393      make install || return 1      make install || return $RC_FAILED
394      return 0      return $RC_SUCCESS
395  }  }
396    
397  # SAML2XACML2 LIB:  # SAML2XACML2 LIB:
# Line 301  saml2_xacml2_c_lib()   { Line 399  saml2_xacml2_c_lib()   {
399      cd ${source}      cd ${source}
400      cvsget org.glite.security.saml2-xacml2-c-lib && \      cvsget org.glite.security.saml2-xacml2-c-lib && \
401      cd org.glite.security.saml2-xacml2-c-lib && \      cd org.glite.security.saml2-xacml2-c-lib && \
402      cp -v -p ../org.glite.build.common-cpp/m4/glite.m4 ./project && \      cp -fp ../org.glite.build.common-cpp/m4/glite.m4 ./project && \
403      export CXXFLAGS=-fPIC && \      export CXXFLAGS=-fPIC && \
404      cd gsoap-2.7 && \      cd gsoap-2.7 && \
405      ../autogen.sh && \      ../autogen.sh && \
# Line 312  saml2_xacml2_c_lib()   { Line 410  saml2_xacml2_c_lib()   {
410      ../autogen.sh && \      ../autogen.sh && \
411      ./configure --prefix=${glite} --with-gsoap=${glite} && \      ./configure --prefix=${glite} --with-gsoap=${glite} && \
412      make && \      make && \
413      make install || return 1      make install || return $RC_FAILED
414      return 0      return $RC_SUCCESS
415  }  }
416    
417  # LCMAPS PLUGINS SCAS CLIENT:  # LCMAPS PLUGINS SCAS CLIENT:
# Line 321  lcmaps_plugins_scas_client()   { Line 419  lcmaps_plugins_scas_client()   {
419      cd ${source}      cd ${source}
420      cvsget org.glite.security.lcmaps-plugins-scas-client && \      cvsget org.glite.security.lcmaps-plugins-scas-client && \
421      cd org.glite.security.lcmaps-plugins-scas-client && \      cd org.glite.security.lcmaps-plugins-scas-client && \
422      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 && \
423      ./bootstrap && \      ./bootstrap && \
424      ./configure --prefix=${glite} --with-glite-location=${glite} && \      ./configure --prefix=${glite} --with-glite-location=${glite} && \
425      make && \      make && \
426      make install || return 1      make install || return $RC_FAILED
427      return 0      return $RC_SUCCESS
428  }  }
429    
430  # SCAS  # SCAS
# Line 334  scas() { Line 432  scas() {
432      cd ${source}      cd ${source}
433      cvsget org.glite.security.scas && \      cvsget org.glite.security.scas && \
434      cd org.glite.security.scas && \      cd org.glite.security.scas && \
435      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 && \
436      ./bootstrap && \      ./bootstrap && \
437      ./configure --prefix=${prefix} --with-glite-location=${glite} \      ./configure --prefix=${prefix} --with-glite-location=${glite} \
438                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
439                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
440                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
441      make && \      make && \
442      make install || return 1      make install || return $RC_FAILED
443      return 0      return $RC_SUCCESS
444  }  }
445    
446  # LCAS PLUGINS BASIC:  # LCAS PLUGINS BASIC:
# Line 350  lcas_plugins_basic()   { Line 448  lcas_plugins_basic()   {
448      cd ${source}      cd ${source}
449      cvsget org.glite.security.lcas-plugins-basic && \      cvsget org.glite.security.lcas-plugins-basic && \
450      cd org.glite.security.lcas-plugins-basic && \      cd org.glite.security.lcas-plugins-basic && \
451      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 && \
452      ./bootstrap && \      ./bootstrap && \
453      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
454                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
455                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
456                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
457      make && \      make && \
458      make install || return 1      make install || return $RC_FAILED
459      return 0      return $RC_SUCCESS
460  }  }
461    
462  # LCAS PLUGINS CHECK-EXECUTABLE:  # LCAS PLUGINS CHECK-EXECUTABLE:
# Line 366  lcas_plugins_check_executable()        { Line 464  lcas_plugins_check_executable()        {
464      cd ${source}      cd ${source}
465      cvsget org.glite.security.lcas-plugins-check-executable && \      cvsget org.glite.security.lcas-plugins-check-executable && \
466      cd org.glite.security.lcas-plugins-check-executable && \      cd org.glite.security.lcas-plugins-check-executable && \
467      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 && \
468      ./bootstrap && \      ./bootstrap && \
469      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
470                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
471                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
472                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
473      make && \      make && \
474      make install || return 1      make install || return $RC_FAILED
475      return 0      return $RC_SUCCESS
476  }  }
477    
478  # GRIDSITE CORE:  # GRIDSITE CORE:
# Line 387  gridsite_core()        { Line 485  gridsite_core()        {
485      cvsget org.gridsite.core && \      cvsget org.gridsite.core && \
486      cd org.gridsite.core/src && \      cd org.gridsite.core/src && \
487      make prefix=${gridsite} libdir=${gridsitelibdir} && \      make prefix=${gridsite} libdir=${gridsitelibdir} && \
488      make prefix=${gridsite} install || return 1      make prefix=${gridsite} install || return $RC_FAILED
489      return 0      return $RC_SUCCESS
490  }  }
491    
492  # LCAS PLUGINS VOMS:  # LCAS PLUGINS VOMS:
# Line 396  lcas_plugins_voms() { Line 494  lcas_plugins_voms() {
494      cd ${source}      cd ${source}
495      cvsget org.glite.security.lcas-plugins-voms && \      cvsget org.glite.security.lcas-plugins-voms && \
496      cd org.glite.security.lcas-plugins-voms && \      cd org.glite.security.lcas-plugins-voms && \
497      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 && \
498      ./bootstrap && \      ./bootstrap && \
499      ./configure --prefix=${glite} --with-glite-location=${glite} \      ./configure --prefix=${glite} --with-glite-location=${glite} \
500                  --with-globus-prefix=${globus} \                  --with-globus-prefix=${globus} \
# Line 405  lcas_plugins_voms() { Line 503  lcas_plugins_voms() {
503                  --with-gridsite-prefix=${gridsite} \                  --with-gridsite-prefix=${gridsite} \
504                  --with-gridsite-ssl=system && \                  --with-gridsite-ssl=system && \
505      make && \      make && \
506      make install || return 1      make install || return $RC_FAILED
507      return 0      return $RC_SUCCESS
508  }  }
509    
510  # LCAS-LCMAPS GT4 interface:  # LCAS-LCMAPS GT4 interface:
# Line 416  lcas_lcmaps_gt4_interface()    { Line 514  lcas_lcmaps_gt4_interface()    {
514      cd ${source}      cd ${source}
515      cvsget org.glite.security.lcas-lcmaps-gt4-interface && \      cvsget org.glite.security.lcas-lcmaps-gt4-interface && \
516      cd org.glite.security.lcas-lcmaps-gt4-interface && \      cd org.glite.security.lcas-lcmaps-gt4-interface && \
517      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 && \
518      ./bootstrap && \      ./bootstrap && \
519      ./configure --prefix=${prefix} \      ./configure --prefix=${prefix} \
520                  --with-glite-location=${glite} \                  --with-glite-location=${glite} \
# Line 424  lcas_lcmaps_gt4_interface()    { Line 522  lcas_lcmaps_gt4_interface()    {
522                  --with-globus-thr-flavor=${globus_flav}pthr \                  --with-globus-thr-flavor=${globus_flav}pthr \
523                  --with-globus-nothr-flavor=${globus_flav} && \                  --with-globus-nothr-flavor=${globus_flav} && \
524      make && \      make && \
525      make install || return 1      make install || return $RC_FAILED
526      return 0      return $RC_SUCCESS
527  }  }
528    
529  ##############################################################################  ##############################################################################
530  #  #
531  # Build all tools, taking care of dependencies, first create source directory.  # Define all dependency functions, NOTE: the order of the setdeps statements is
532    # important!
533  #  #
534  ##############################################################################  ##############################################################################
535    
 mkdir -p ${source} || {  
     echo "Creating of ${source} FAILED" >&2  
     exit 1 # Fatal...  
 }  
   
536  # GLOBUS: no dependencies  # GLOBUS: no dependencies
537  globus  setdeps globus
 rc_globus=$?  
538    
539  # BUILD COMMON-CPP: no dependencies  # BUILD COMMON-CPP: no dependencies
540  build_common_cpp  setdeps common_cpp
 rc_macros=$?  
541    
542  # VOMS: depends globus  # VOMS: depends globus
543  if [ $rc_globus -eq 0 ];then  setdeps voms globus
     voms  
     rc_voms=$?  
 else  
     rc_voms=-1  
 fi  
544    
545  # LCMAPS: depends globus, voms, common-cpp  # LCMAPS: depends globus, voms, common-cpp
546  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  
547    
548  # LCAS: depends globus, common-cpp  # LCAS: depends globus, common-cpp
549  if [ $rc_globus -eq 0 -a $rc_macros -eq 0 ];then  setdeps lcas globus common_cpp
     lcas  
     rc_lcas=$?  
 else  
     rc_lcas=-1  
 fi  
550    
551  # LCAS-INTERFACE: depends common-cpp  # LCAS-INTERFACE: depends common-cpp
552  if [ $rc_macros -eq 0 ];then  setdeps lcas_interface common_cpp
     lcas_interface  
     rc_lcas_interface=$?  
 else  
     rc_lcas_interface=-1  
 fi  
553    
554  # GLEXEC: depends globus, lcmaps, common-cpp, lcas, lcas-interface  # GLEXEC: depends globus, lcmaps, common-cpp, lcas, lcas-interface
555  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  
556    
557  # LCMAPS PLUGINS BASIC: depends globus, lcmaps, common-cpp  # LCMAPS PLUGINS BASIC: depends globus, lcmaps, common-cpp
558  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  
559    
560  # LCMAPS PLUGINS VERIFY-PROXY: depends lcmaps, common-cpp  # LCMAPS PLUGINS VERIFY-PROXY: depends lcmaps, common-cpp
561  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  
562    
563  # LCMAPS PLUGINS VOMS: depends globus, voms, lcmaps, common-cpp  # LCMAPS PLUGINS VOMS: depends globus, voms, lcmaps, common-cpp
564  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  
565    
566  # LCMAPS PLUGINS AFS: depends lcmaps, common-cpp  # LCMAPS PLUGINS AFS: depends lcmaps, common-cpp
567  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  
568    
569  # LCMAPS PLUGINS GUMS: depends lcmaps, common-cpp  # LCMAPS PLUGINS GUMS: depends lcmaps, common-cpp
570  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  
571    
572  # 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
573  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  
574    
575  # LCMAPS PLUGINS C-PEP: depends lcmaps, pep-c lib, common-cpp  # LCMAPS PLUGINS C-PEP: depends lcmaps, pep-c lib, common-cpp
576  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  
577    
578  # SAML2XACML2 LIB: depends common-cpp  # SAML2XACML2 LIB: depends common-cpp
579  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  
580    
581  # LCMAPS PLUGINS SCAS CLIENT: depends saml2-xacml2-c-lib, common-cpp  # LCMAPS PLUGINS SCAS CLIENT: depends saml2-xacml2-c-lib, common-cpp
582  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  
583    
584  # SCAS: depends saml2-xacml2-c-lib, common-cpp, lcmaps  # SCAS: depends saml2-xacml2-c-lib, common-cpp, lcmaps
585  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  
586    
587  # LCAS PLUGINS BASIC: depends globus, lcas, common-cpp  # LCAS PLUGINS BASIC: depends globus, lcas, common-cpp
588  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  
589    
590  # LCAS PLUGINS CHECK-EXECUTABLE: depends globus, lcas, common-cpp  # LCAS PLUGINS CHECK-EXECUTABLE: depends globus, lcas, common-cpp
591  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  
592    
593  # GRIDSITE Core:  # GRIDSITE Core:
594  gridsite_core  setdeps gridsite_core
 rc_gridsite_core=$?  
595    
596  # LCAS PLUGINS VOMS: depends globus, voms, lcas, common-cpp, gridsite  # LCAS PLUGINS VOMS: depends globus, voms, lcas, common-cpp, gridsite
597  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  
598    
599  # LCAS-LCMAPS GT4 interface: depends globus, lcmaps, common-cpp, lcas, lcas-interface  # LCAS-LCMAPS GT4 interface: depends globus, lcmaps, common-cpp, lcas, lcas-interface
600  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  
   
601    
602  ##############################################################################  ##############################################################################
603  #  #
604  # Print results  # Build all tools, taking care of dependencies
605  #  #
606  ##############################################################################  ##############################################################################
607    
608  print_result "GLOBUS"                           $rc_globus  # Now that we know all the targets, we can print usage if requested
609  print_result "BUILD-COMMON-CPP"                 $rc_macros  if [ "$USAGE" -eq 1 ];then
610  print_result "VOMS"                             $rc_voms      usage
611  print_result "LCMAPS"                           $rc_lcmaps      exit 0
612  print_result "LCAS"                             $rc_lcas  fi
613  print_result "LCAS interface"                   $rc_lcas_interface  
614  print_result "gLExec"                           $rc_glexec  # Figure out the build targets
615  print_result "LCMAPS plugins-basic"             $rc_lcmaps_plugins_basic  build_targets=""
616  print_result "LCMAPS plugins-verify-proxy"      $rc_lcmaps_plugins_verify_proxy  # If none specified, use all
617  print_result "LCMAPS plugins-voms"              $rc_lcmaps_plugins_voms  if [ -z "$targets" ];then
618  print_result "LCMAPS plugins-afs"               $rc_lcmaps_plugins_afs      build_targets=$known_targets
619  print_result "LCMAPS plugins-gums"              $rc_lcmaps_plugins_gums  else
620  print_result "PEP-C Library"                    $rc_pep_c_lib      for target in $targets;do
621  print_result "LCMAPS plugins-c-pep"             $rc_lcmaps_plugins_c_pep          echo $known_targets|tr ' ' '\n'|grep -q "^$target$" && \
622  print_result "SAML2-XACML2 C-library"           $rc_saml2_xacml2_c_lib              build_targets="$build_targets $target" || \
623  print_result "LCMAPS plugins-scas-client"       $rc_lcmaps_plugins_scas_client              echo "Skipping unknown target \"$target\"" >&2
624  print_result "SCAS"                             $rc_scas      done
625  print_result "LCAS plugins-basic"               $rc_lcas_plugins_basic  fi
626  print_result "LCAS plugins-check-executable"    $rc_lcas_plugins_check_executable  
627  print_result "GridSite core"                    $rc_gridsite_core  # Anything to be done?
628  print_result "LCAS plugins-voms"                $rc_lcas_plugins_voms  if [ -n "$build_targets" ];then
629  print_result "LCAS-LCMAPS GT4-interface"        $rc_lcas_lcmaps_gt4_interface      # create the source dir
630        mkdir -p ${source} || {
631            echo "Creating of ${source} FAILED" >&2
632            exit 1 # Fatal...
633        }
634    
635        # Get globus_flavour just in case we won't build. If it will be build, it
636        # will be reset afterwards.
637        globus_flavour
638    
639        # Do the builds
640        for target in $build_targets;do
641            eval dep_$target
642        done
643    
644        # Print results
645        for target in $known_targets;do
646            print_result $target
647        done
648    fi
649    

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

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