EMI build:
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 29 Nov 2010 14:50:12 +0000 (14:50 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 29 Nov 2010 14:50:12 +0000 (14:50 +0000)
- configure: globus flavours may be empty
- gss and gsoap-plugin builds

org.glite.security.gsoap-plugin/Makefile
org.glite.security.gsoap-plugin/configure
org.glite.security.gss/Makefile
org.glite.security.gss/configure

index d1ce72e..188706c 100644 (file)
@@ -9,8 +9,6 @@ version=1.0.0
 PREFIX=/opt/glite
 
 glite_location=/opt/glite
-nothrflavour=gcc32
-thrflavour=gcc32pthr
 gsoap_prefix=/opt/gsoap
 
 CC=gcc
@@ -97,16 +95,21 @@ ifeq (${lang},cxx)
 LINK_lang:=${LINKXX}
 endif
 
-EX_LIBS:=-L${stagedir}/${libdir} -lglite_security_gss_${nothrflavour}
+GSOAP_LIBS?=-L${gsoap_prefix}/${libdir} -lgsoap
+
+EX_NOTHRLIBS:=-L${stagedir}/${libdir} -lglite_security_gss_${nothrflavour}
 EX_THRLIBS:=-L${stagedir}/${libdir} -lglite_security_gss_${thrflavour}
+EX_LIBS:=-L${stagedir}/${libdir} -lglite_security_gss
 HDRS:=glite_gsplugin.h glite_gscompat.h glite_gsplugin-int.h
 EXAMPLES:=wscalc_clt_ex wscalc_srv_ex wscalc_srv_ex2
 TESTS:=test_cxx
 
-STATICLIB:=libglite_security_gsoap_plugin_${nothrflavour}${langflavour}.a
+NOTHRSTATICLIB:=libglite_security_gsoap_plugin_${nothrflavour}${langflavour}.a
 THRSTATICLIB:=libglite_security_gsoap_plugin_${thrflavour}${langflavour}.a
-LTLIB:=libglite_security_gsoap_plugin_${nothrflavour}${langflavour}.la
+STATICLIB:=libglite_security_gsoap_plugin${langflavour}.a
+NOTHRLTLIB:=libglite_security_gsoap_plugin_${nothrflavour}${langflavour}.la
 THRLTLIB:=libglite_security_gsoap_plugin_${thrflavour}${langflavour}.la
+LTLIB:=libglite_security_gsoap_plugin${langflavour}.la
 
 OBJS:=${GSS_OBJS} glite_gsplugin${langsuffix}.o
 LOBJS:=${OBJS:.o=.lo}
@@ -114,32 +117,66 @@ THROBJS:=${OBJS:.o=.thr.o}
 THRLOBJS:=${OBJS:.o=.thr.lo}
 
 dotless_ver:=${shell echo ${gsoap_version} | tr -d '.'}
-STATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}${langflavour}.a
+NOTHRSTATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}${langflavour}.a
 THRSTATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${thrflavour}${langflavour}.a
-LTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}${langflavour}.la
+STATICLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}${langflavour}.a
+NOTHRLTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}${langflavour}.la
 THRLTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}_${thrflavour}${langflavour}.la
+LTLIB_S:=libglite_security_gsoap_plugin_${dotless_ver}${langflavour}.la
+
+ifeq (${thrflavour},)
+lib_LTLIBRARIES:=${STATICLIB} ${LTLIB}
+lib_LTLIBRARIES_S:=${LTLIB_S}
+LTLIB_TEST_S:=libglite_security_gsoap_plugin_${dotless_ver}_cxx.la
+default_ltlib_s:=${LTLIB_S}
+else
+lib_LTLIBRARIES:=${NOTHRSTATICLIB} ${NOTHRLTLIB} ${THRSTATICLIB} ${THRLTLIB}
+lib_LTLIBRARIES_S:=${NOTHRLTLIB_S} ${THRLTLIB_S}
 LTLIB_TEST_S:=libglite_security_gsoap_plugin_${dotless_ver}_${nothrflavour}_cxx.la
+default_ltlib_s:=${NOTHRLTLIB_S}
+endif
 
+ifeq (${gsoap_version},${gsoap_default_version})
+OBJS_S:=glite_gsplugin${langsuffix}.o
+GSOAP_DEFAULT_LIBS:=${GSOAP_LIBS}
+else
 OBJS_S:=glite_gsplugin${langsuffix}.o stdsoap2${langsuffix}.o
+GSOAP_DEFAULT_LIBS:=
+endif
 LOBJS_S:=${OBJS_S:.o=.lo}
 THROBJS_S:=${OBJS_S:.o=.thr.o}
 THRLOBJS_S:=${OBJS_S:.o=.thr.lo}
 
+ifeq (${thrflavour},)
 ${STATICLIB}: ${OBJS}
        ar crv $@ ${OBJS}
        ranlib $@
 
+${LTLIB}: ${OBJS}
+       ${LINK_lang} ${version_info} -o $@ ${LOBJS} ${EX_LIBS}
+
+${STATICLIB_S}: ${OBJS_S}
+       ar crv $@ ${OBJS_S}
+       ranlib $@
+
+${LTLIB_S}: ${OBJS_S}
+       ${LINK_lang} ${version_info} -o $@ ${LOBJS_S} ${EX_LIBS} ${GSOAP_DEFAULT_LIBS}
+else
+${NOTHRSTATICLIB}: ${OBJS}
+       ar crv $@ ${OBJS}
+       ranlib $@
+
 ${THRSTATICLIB}: ${THROBJS}
        ar crv $@ ${THROBJS}
        ranlib $@
 
-${LTLIB}: ${OBJS} 
-       ${LINK_lang} ${version_info} -o $@ ${LOBJS} ${EX_LIBS}
+${NOTHRLTLIB}: ${OBJS} 
+       ${LINK_lang} ${version_info} -o $@ ${LOBJS} ${EX_NOTHRLIBS}
 
 ${THRLTLIB}: ${THROBJS}
        ${LINK_lang} ${version_info} -o $@ ${THRLOBJS} ${EX_THRLIBS}
 
-${STATICLIB_S}: ${OBJS_S}
+${NOTHRSTATICLIB_S}: ${OBJS_S}
        ar crv $@ ${OBJS_S}
        ranlib $@
 
@@ -147,14 +184,15 @@ ${THRSTATICLIB_S}: ${THROBJS_S}
        ar crv $@ ${THROBJS_S}
        ranlib $@
 
-${LTLIB_S}: ${OBJS_S} 
-       ${LINK_lang} ${version_info} -o $@ ${LOBJS_S} ${EX_LIBS}
+${NOTHRLTLIB_S}: ${OBJS_S} 
+       ${LINK_lang} ${version_info} -o $@ ${LOBJS_S} ${EX_NOTHRLIBS} ${GSOAP_DEFAULT_LIBS}
 
 ${THRLTLIB_S}: ${THROBJS_S}
        ${LINK_lang} ${version_info} -o $@ ${THRLOBJS_S} ${EX_THRLIBS}
+endif
 
 all compile: \
-       ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB} \
+       ${lib_LTLIBRARIES} \
        all-libs-with-soap examples
 
 check: check.cxx
@@ -180,12 +218,14 @@ all-libs-with-soap:
                ${MAKE} -C $$dir -f ../Makefile gsoap_version=$$v top_srcdir=../.. lang=cxx libs-with-soap || exit $?; \
        done
 
-libs-with-soap: ${LTLIB_S} ${THRLTLIB_S} ${STATICLIB_S} ${THRSTATICLIB_S}
+libs-with-soap: ${lib_LTLIBRARIES_S}
 
 gsoap_srcname=gsoap-`echo ${gsoap_version} | cut -d. -f1,2`
 
 link-gsoap:
-       if [ -f ${top_srcdir}/src/stdsoap2_${gsoap_version}.c ]; then \
+       if [ ${gsoap_version} = ${gsoap_default_version} ]; then \
+               ln -sf ${gsoap_prefix}/include/stdsoap2.h stdsoap2.h; \
+       elif [ -f ${top_srcdir}/src/stdsoap2_${gsoap_version}.c ]; then \
                ln -sf ${top_srcdir}/src/stdsoap2_${gsoap_version}.c stdsoap2.c; \
                ln -sf ${top_srcdir}/src/stdsoap2_${gsoap_version}.h stdsoap2.h; \
        elif [ -f ${ext_repository}/${gsoap_name}/${gsoap_version}/src/stdsoap2.c ]; then \
@@ -212,14 +252,14 @@ WSCALC_SRV2_OBJS = wscalc_srv_ex2.o ${GSOAP_FPREFIX}C.o ${GSOAP_FPREFIX}Server.o
 
 wscalc_clt_ex.o wscalc_srv_ex.o wscalc_srv_ex2.o: ${GSOAP_FPREFIX}H.h
 
-wscalc_clt_ex: ${WSCALC_CLT_OBJS} ${LTLIB_S}
-       ${LINK_lang} -o $@ ${WSCALC_CLT_OBJS} ${LTLIB_S}
+wscalc_clt_ex: ${WSCALC_CLT_OBJS} ${default_ltlib_s}
+       ${LINK_lang} -o $@ ${WSCALC_CLT_OBJS} ${default_ltlib_s} ${GSOAP_DEFAULT_LIBS}
 
-wscalc_srv_ex: ${WSCALC_SRV_OBJS} ${LTLIB_S}
-       ${LINK_lang} -o $@ ${WSCALC_SRV_OBJS} ${LTLIB_S}
+wscalc_srv_ex: ${WSCALC_SRV_OBJS} ${default_ltlib_s}
+       ${LINK_lang} -o $@ ${WSCALC_SRV_OBJS} ${default_ltlib_s} ${GSOAP_DEFAULT_LIBS}
 
-wscalc_srv_ex2: ${WSCALC_SRV2_OBJS} ${LTLIB_S}
-       ${LINK_lang} -o $@ ${WSCALC_SRV2_OBJS} ${LTLIB_S}
+wscalc_srv_ex2: ${WSCALC_SRV2_OBJS} ${default_ltlib_s}
+       ${LINK_lang} -o $@ ${WSCALC_SRV2_OBJS} ${default_ltlib_s} ${GSOAP_DEFAULT_LIBS}
 
 test_cxx: test_gsplugin_cxx.o ${GSOAP_FPREFIX}C.cxx.o
        ${LINKXX} -o $@ $+ ${LTLIB_TEST_S}
@@ -256,11 +296,11 @@ install:
        done
 
 install-soaplib:
-       ${INSTALL} -m 755 ${LTLIB_S} ${THRLTLIB_S} ${PREFIX}/${libdir}
+       ${INSTALL} -m 755 ${lib_LTLIBRARIES_S} ${PREFIX}/${libdir}
 
 clean:
-       rm -rvf ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB}
-       rm -rvf ${LTLIB_S} ${THRLTLIB_S} ${STATICLIB_S} ${THRSTATICLIB_S}
+       rm -rvf ${lib_LTLIBRARIES}
+       rm -rvf ${lib_LTLIBRARIES_S}
        rm -rvf ${LTLIB_TEST_S}
        rm -rvf *.c *.h *.xml *.nsmap *.o *.lo .libs ${EXAMPLES} ${TESTS}
        rm -rvf CalcService.wsdl wscalc.xsd
index d02462c..dba8bf2 100755 (executable)
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -73,8 +74,8 @@ my %extern_prefix = (
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -95,6 +96,7 @@ my %lbmodules = (
        'jobid' => [qw/api-c api-cpp api-java/],
        'jp' => [ qw/client doc index primary server-common ws-interface/ ],
        'gridsite' => [ qw/apache shared commands core/ ],
+       'px' => [ qw/proxyrenewal glite-PX myproxy-yaim/ ],
        );
 
 
@@ -102,8 +104,8 @@ my @opts = (
        'prefix=s' => \$prefix,
        'staged=s' => \$staged,
        'module=s' => \$module,
-       'thrflavour=s' => \$thrflavour,
-       'nothrflavour=s' => \$nothrflavour,
+       'thrflavour:s' => \$thrflavour,
+       'nothrflavour:s' => \$nothrflavour,
        'mode=s' => \$mode,
        'listmodules=s' => \$listmodules,
        'version=s' => \$version,
@@ -117,6 +119,7 @@ my @opts = (
        'jobid-tag=s' => \$jobid_tag,
        'help' => \$help,
        'libdir=s' => \$libdir,
+       'emi' => \$emi,
 );
 
 for (@nodes) {
@@ -348,6 +351,9 @@ BEGIN{
         'jp.server-common' => [],
         'jp.ws-interface' => [],
        'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+       'px.proxyrenewal' => [ qw/globus:B myproxy voms/ ],
+       'px.glite-PX' => [qw/myproxy:R/],
+       'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -360,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -457,6 +463,10 @@ for my $jar (keys %need_jars) {
        'jp.ws-interface' => [ qw// ],
 
        'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+       'px.proxyrenewal' => [ qw// ],
+       'px.glite-PX' => [qw/px.myproxy-yaim:R/],
+       'px.myproxy-yaim' => [],
 );
 
 for my $ext (keys %deps_aux) {
@@ -481,6 +491,8 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+       'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
 );
 
 %cvs_prefix = (
@@ -490,6 +502,7 @@ for my $ext (keys %deps_aux) {
        'lbjp-common' => 'org.glite',
        'gridsite' => 'org',
        'security' => 'org.glite',
+       'px' => 'org.glite',
 );
 
 %conf_prefix = (
@@ -499,6 +512,17 @@ for my $ext (keys %deps_aux) {
        'lbjp-common' => 'glite-',
        'gridsite' => '',
        'security' => 'glite-',
+       'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+       'lb' => 'emi-',
+       'jp' => 'emi-',
+       'jobid' => 'emi-',
+       'lbjp-common' => 'emi-',
+       'gridsite' => '',
+       'security' => 'emi-',
+       'px' => 'emi-',
 );
 
 my @k = keys %deps_aux;
@@ -526,6 +550,7 @@ security.gss security.gsoap-plugin
 jobid.api-c jobid.api-cpp jobid.api-java
 lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX
 /;
        @aux{@m} = (1) x ($#m+1);
 
@@ -583,6 +608,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -600,7 +626,7 @@ BEGIN{
                yaim_core=>'org.glite.yaim.core',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               vdt=>[qw/globus globus_essentials myproxy/],
                'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
        );
 
@@ -657,22 +683,33 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}$jar{$_}";
        }
 
        my $conf;
        my $conftag;
+       my $confprefix;
 
        $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+       if ($emi) { $confprefix = $emi_conf_prefix{$subsys} }
+       else { $confprefix = $conf_prefix{$subsys} }
+
        if ($branch) {
-               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conf = "$confprefix${subsys}-${module}_$branch"; 
                $conftag = $branch;
-               $age = '0dev'; }
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+               $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
 # XXX: gridsite hack
-               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
+                       "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+       if ($emi) {
+               $age = "${age}emi";
+       } 
+
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
@@ -734,6 +771,13 @@ sub mode_etics {
                $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
        }
 
+       my $checkoutcmd;
+       if ($conftag eq 'HEAD') {
+               $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
+       } else {
+               $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
+       }
+
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
@@ -753,7 +797,7 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
@@ -776,8 +820,9 @@ $buildroot
 aprSuffix = 0
 package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
 package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
@@ -898,7 +943,10 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --version=maj.min.rev-age    specify version here instead of reading version.properties
+  --branch=branch              CVS branch/etics name suffix (HEAD, branch_2_1, ...)
   --libdir=libdir              typically [lib,lib64] postfix
+  --emi                                generate configurations with emi flavor in mode 'etics'
   
 Mode of operation:
   --mode={checkout|build|etics}        what to do [build]
index 78d41a1..2695e66 100644 (file)
@@ -11,8 +11,6 @@ PREFIX=/opt/glite
 glite_location=/opt/glite
 globus_prefix=/opt/globus
 cppunit_prefix=/opt/cppunit
-nothrflavour=gcc32
-thrflavour=gcc32pthr
 
 CC=gcc
 
@@ -38,9 +36,6 @@ version_info:=-version-info ${shell \
 
 VPATH=${top_srcdir}/src:${top_srcdir}/test
 
-TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
-TEST_INC:=-I${cppunit_prefix}/include
-
 default: all
 
 DEBUG:=-g -O0 -W -Wall -Wno-unused-parameter
@@ -59,22 +54,24 @@ LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS}
 LINKXX:=libtool --mode=link  ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS}
 INSTALL:=libtool --mode=install install
 
-GLOBUS_INC:= -I${globus_prefix}/include/${nothrflavour}
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
+
+GLOBUS_NOTHR_INC:= -I${globus_prefix}/include/${nothrflavour}
 GLOBUS_THR_INC:= -I${globus_prefix}/include/${thrflavour}
 
-GLOBUS_LIBS:= -L${globus_prefix}/lib \
+GLOBUS_NOTHR_LIBS:= -L${globus_prefix}/lib \
        -lglobus_common_${nothrflavour} \
        -lglobus_gssapi_gsi_${nothrflavour} \
-
 GLOBUS_THR_LIBS:= -L${globus_prefix}/lib \
        -lglobus_common_${thrflavour} \
        -lglobus_gssapi_gsi_${thrflavour}
 
-ARES_INC:=-I${cares_prefix}/include
-ARES_LIBS:=-L${cares_prefix}/${libdir} -L${cares_prefix}/lib -lcares
+GLOBUS_GSSAPI_GSI_LIBS?=${GLOBUS_NOTHR_LIBS}
+GLOBUS_GSSAPI_GSI_CFLAGS?=${GLOBUS_NOTHR_INC}
 
-EX_LIBS:= ${GLOBUS_LIBS} ${ARES_LIBS}
-EX_THRLIBS := ${GLOBUS_THR_LIBS} ${ARES_LIBS}
+LIBCARES_CFLAGS?=-I${cares_prefix}/include
+LIBCARES_LIBS?=-L${cares_prefix}/${libdir} -L${cares_prefix}/lib -lcares
 
 HDRS:=glite_gss.h
 
@@ -83,12 +80,25 @@ GSS_LOBJS:=${GSS_OBJS:.o=.lo}
 GSS_THROBJS:=${GSS_OBJS:.o=.thr.o}
 GSS_THRLOBJS:=${GSS_OBJS:.o=.thr.lo}
 
-GSS_STATICLIB:=libglite_security_gss_${nothrflavour}.a
+GSS_NOTHRSTATICLIB:=libglite_security_gss_${nothrflavour}.a
 GSS_THRSTATICLIB:=libglite_security_gss_${thrflavour}.a
-GSS_LTLIB:=libglite_security_gss_${nothrflavour}.la
+GSS_STATICLIB:=libglite_security_gss.a
+GSS_NOTHRLTLIB:=libglite_security_gss_${nothrflavour}.la
 GSS_THRLTLIB:=libglite_security_gss_${thrflavour}.la
+GSS_LTLIB:=libglite_security_gss.la
 
-${GSS_STATICLIB}: ${GSS_OBJS}
+ifeq ($(thrflavour),)
+lib_LTLIBRARIES=${GSS_LTLIB}
+lib_LIBRARIES=${GSS_STATICLIB}
+default_gss=${GSS_LTLIB}
+else
+lib_LTLIBRARIES=${GSS_NOTHRLTLIB} ${GSS_THRLTLIB}
+lib_LIBRARIES=${GSS_NOTHRSTATICLIB} ${GSS_THRSTATICLIB}
+default_gss=${GSS_NOTHRLTLIB}
+endif
+
+
+${GSS_NOTHRSTATICLIB}: ${GSS_OBJS}
        ar crv $@ ${GSS_OBJS}
        ranlib $@
 
@@ -96,16 +106,21 @@ ${GSS_THRSTATICLIB}: ${GSS_THROBJS}
        ar crv $@ ${GSS_THROBJS}
        ranlib $@
 
-${GSS_LTLIB}: ${GSS_OBJS}
-       ${LINK} ${version_info} -o $@ ${GSS_LOBJS} ${EX_LIBS}
+${GSS_STATICLIB}: ${GSS_OBJS}
+       ar crv $@ ${GSS_OBJS}
+       ranlib $@
+
+${GSS_NOTHRLTLIB}: ${GSS_OBJS}
+       ${LINK} ${version_info} -o $@ ${GSS_LOBJS} ${GLOBUS_NOTHR_LIBS} ${LIBCARES_LIBS}
 
 ${GSS_THRLTLIB}: ${GSS_THROBJS}
-       ${LINK} ${version_info} -o $@ ${GSS_THRLOBJS} ${EX_THRLIBS}
+       ${LINK} ${version_info} -o $@ ${GSS_THRLOBJS} ${GLOBUS_THR_LIBS} ${LIBCARES_LIBS}
+
+${GSS_LTLIB}: ${GSS_OBJS}
+       ${LINK} ${version_info} -o $@ ${GSS_LOBJS} ${GLOBUS_GSSAPI_GSI_LIBS} ${LIBCARES_LIBS}
 
 
-all compile: \
-       ${GSS_STATICLIB} ${GSS_LTLIB} ${GSS_THRSTATICLIB} ${GSS_THRLTLIB} \
-       examples
+all compile: $(lib_LTLIBRARIES) ${lib_LIBRARIES} examples
 
 check: compile check.gss
 
@@ -114,7 +129,7 @@ check.gss: test_gss
        echo test_gss not run automatically util we have got some credentials in X509_USER_PROXY
 
 test_gss: test_gss.o
-       ${LINKXX} -o $@ test_gss.o ${GSS_LTLIB} ${TEST_LIBS} ${GLOBUS_LIBS} ${EX_LIBS}
+       ${LINKXX} -o $@ test_gss.o ${default_gss} ${CPPUNIT_LIBS} ${GLOBUS_GSSAPI_GSI_LIBS} ${LIBCARES_LIBS}
 
 test_coverage:
        -mkdir coverage
@@ -132,11 +147,11 @@ install:
        -mkdir -p ${PREFIX}/${libdir}
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        -mkdir -p ${PREFIX}/include/glite/security
-       ${INSTALL} -m 755 ${GSS_LTLIB} ${GSS_THRLTLIB} ${PREFIX}/${libdir}
+       ${INSTALL} -m 755 ${lib_LTLIBRARIES} ${PREFIX}/${libdir}
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/glite/security/
        if [ x${DOSTAGE} = xyes ]; then \
-               install -m 644 ${GSS_STATICLIB} ${GSS_THRSTATICLIB} ${PREFIX}/${libdir}; \
+               install -m 644 ${lib_LIBRARIES} ${PREFIX}/${libdir}; \
        fi
 
 clean:
@@ -144,10 +159,10 @@ clean:
        rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.o: %.c
-       ${COMPILE} ${GLOBUS_INC} ${ARES_INC} -o $@ -c $<
+       ${COMPILE} ${GLOBUS_GSSAPI_GSI_CFLAGS} ${LIBCARES_CFLAGS} -o $@ -c $<
 
 %.thr.o: %.c
-       ${COMPILE} ${GLOBUS_THR_INC} ${ARES_INC} -o $@ -c $<
+       ${COMPILE} ${GLOBUS_THR_INC} ${LIBCARES_CFLAGS} -o $@ -c $<
 
 test_gss.o: %.o: %.cpp
-       ${CXX} -c ${CFLAGS} ${GLOBUS_INC} ${TEST_INC} -Wno-error $<
+       ${CXX} -c ${CFLAGS} ${GLOBUS_GSSAPI_GSI_CFLAGS} ${CPPUNIT_CFLAGS} -Wno-error $<
index d02462c..dba8bf2 100755 (executable)
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -73,8 +74,8 @@ my %extern_prefix = (
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -95,6 +96,7 @@ my %lbmodules = (
        'jobid' => [qw/api-c api-cpp api-java/],
        'jp' => [ qw/client doc index primary server-common ws-interface/ ],
        'gridsite' => [ qw/apache shared commands core/ ],
+       'px' => [ qw/proxyrenewal glite-PX myproxy-yaim/ ],
        );
 
 
@@ -102,8 +104,8 @@ my @opts = (
        'prefix=s' => \$prefix,
        'staged=s' => \$staged,
        'module=s' => \$module,
-       'thrflavour=s' => \$thrflavour,
-       'nothrflavour=s' => \$nothrflavour,
+       'thrflavour:s' => \$thrflavour,
+       'nothrflavour:s' => \$nothrflavour,
        'mode=s' => \$mode,
        'listmodules=s' => \$listmodules,
        'version=s' => \$version,
@@ -117,6 +119,7 @@ my @opts = (
        'jobid-tag=s' => \$jobid_tag,
        'help' => \$help,
        'libdir=s' => \$libdir,
+       'emi' => \$emi,
 );
 
 for (@nodes) {
@@ -348,6 +351,9 @@ BEGIN{
         'jp.server-common' => [],
         'jp.ws-interface' => [],
        'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+       'px.proxyrenewal' => [ qw/globus:B myproxy voms/ ],
+       'px.glite-PX' => [qw/myproxy:R/],
+       'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -360,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -457,6 +463,10 @@ for my $jar (keys %need_jars) {
        'jp.ws-interface' => [ qw// ],
 
        'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+       'px.proxyrenewal' => [ qw// ],
+       'px.glite-PX' => [qw/px.myproxy-yaim:R/],
+       'px.myproxy-yaim' => [],
 );
 
 for my $ext (keys %deps_aux) {
@@ -481,6 +491,8 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+       'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
 );
 
 %cvs_prefix = (
@@ -490,6 +502,7 @@ for my $ext (keys %deps_aux) {
        'lbjp-common' => 'org.glite',
        'gridsite' => 'org',
        'security' => 'org.glite',
+       'px' => 'org.glite',
 );
 
 %conf_prefix = (
@@ -499,6 +512,17 @@ for my $ext (keys %deps_aux) {
        'lbjp-common' => 'glite-',
        'gridsite' => '',
        'security' => 'glite-',
+       'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+       'lb' => 'emi-',
+       'jp' => 'emi-',
+       'jobid' => 'emi-',
+       'lbjp-common' => 'emi-',
+       'gridsite' => '',
+       'security' => 'emi-',
+       'px' => 'emi-',
 );
 
 my @k = keys %deps_aux;
@@ -526,6 +550,7 @@ security.gss security.gsoap-plugin
 jobid.api-c jobid.api-cpp jobid.api-java
 lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX
 /;
        @aux{@m} = (1) x ($#m+1);
 
@@ -583,6 +608,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -600,7 +626,7 @@ BEGIN{
                yaim_core=>'org.glite.yaim.core',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               vdt=>[qw/globus globus_essentials myproxy/],
                'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
        );
 
@@ -657,22 +683,33 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}$jar{$_}";
        }
 
        my $conf;
        my $conftag;
+       my $confprefix;
 
        $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+       if ($emi) { $confprefix = $emi_conf_prefix{$subsys} }
+       else { $confprefix = $conf_prefix{$subsys} }
+
        if ($branch) {
-               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conf = "$confprefix${subsys}-${module}_$branch"; 
                $conftag = $branch;
-               $age = '0dev'; }
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+               $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
 # XXX: gridsite hack
-               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
+                       "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+       if ($emi) {
+               $age = "${age}emi";
+       } 
+
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
@@ -734,6 +771,13 @@ sub mode_etics {
                $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
        }
 
+       my $checkoutcmd;
+       if ($conftag eq 'HEAD') {
+               $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
+       } else {
+               $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
+       }
+
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
@@ -753,7 +797,7 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
@@ -776,8 +820,9 @@ $buildroot
 aprSuffix = 0
 package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
 package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
@@ -898,7 +943,10 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --version=maj.min.rev-age    specify version here instead of reading version.properties
+  --branch=branch              CVS branch/etics name suffix (HEAD, branch_2_1, ...)
   --libdir=libdir              typically [lib,lib64] postfix
+  --emi                                generate configurations with emi flavor in mode 'etics'
   
 Mode of operation:
   --mode={checkout|build|etics}        what to do [build]