Difference between revisions of "SAML2-XACML2-C-LIB build instructions"

From PDP/Grid Wiki
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
 
Set some proper environment variables for the build:
 
Set some proper environment variables for the build:
 
  export prefix="/usr";
 
  export prefix="/usr";
  export srclocation=`pwd`;
+
  export srclocation=`pwd`
  export CXXFLAGS=-fPIC ;
+
export gsoaplocation="${srclocation}/gsoap-2.7-build"
 +
  export CXXFLAGS=-fPIC
  
 
Set the option to make a SAML2-XACML2-C-Lib service to used threading. This is the default build option for both clients as service to be enabled.
 
Set the option to make a SAML2-XACML2-C-Lib service to used threading. This is the default build option for both clients as service to be enabled.
 
  export CPPFLAG="-DXACML_ADDING_THREADING" ;  
 
  export CPPFLAG="-DXACML_ADDING_THREADING" ;  
  
If needed, set a proper LIBDIR that makes sense for your intend.
+
Untar the gSOAP tarball and move into the directory:
  export libdir="${prefix}/lib"
+
tar xzf gsoap-2.7.17.tar.gz
 +
  cd ${srclocation}/gsoap-2.7
 +
   
 +
Run configure and make:
 +
./configure --prefix=${prefix}
 +
make
  
 +
Use make install DESTDIR to stage the gSOAP builds in a proper directory. The safest option is somewhere in your current build root:
 +
make DESTDIR=${gsoaplocation} install
 +
 +
Go into the XACML src dir:
 +
cd ${srclocation}/xacml-1.0
 +
 +
Depending upon the type of source file download or check out you've performed, you might need to run autotool with:
 +
./bootstrap
 +
 +
Configure of XACML with reference to gSOAP and run make:
 +
./configure --with-gsoap=${gsoaplocation}/usr --disable-static
 +
make
 +
 +
For installation on your system (into /usr/local)
 +
sudo make install
 +
 +
 +
=== For builds into a different location, like a stage dir or a private stage dir ===
 +
Redo the following step like this, with a prefix of your choice (default in "/usr"):
 +
Configure of XACML with reference to gSOAP and run make:
 +
./configure --prefix=${prefix}--with-gsoap=${gsoaplocation}/usr --disable-static
 +
make
  
export libdir="lib";
+
If you want to create a distribution worthy package, I recommend to do:
tar xzf gsoap-2.7.17.tar.gz;
+
  ./configure --prefix=${prefix}--with-gsoap=${gsoaplocation}/usr --disable-static
cd ${SRCLOC}/gsoap-2.7
 
  ./configure --prefix=/usr --libdir=/usr/${libdir}
 
make && make DESTDIR=${SRCLOC}/gsoap-2.7-build install
 
cd ${SRCLOC}/xacml-1.0
 
./bootstrap && ./configure --prefix=/usr --libdir=/usr/${libdir} --with-gsoap=${SRCLOC}/gsoap-2.7-build/usr --disable-static
 
 
  make
 
  make
cd ${SRCLOC}/xacml-1.0
+
  make DESTDIR=/tmp/my_build install
  make DESTDIR=${prefix} install
 
  
 
=== Important notice for 64 bit Fedora / Red Hat ===
 
=== Important notice for 64 bit Fedora / Red Hat ===
 
Use in BOTH '''configure''' commands the option:
 
Use in BOTH '''configure''' commands the option:
 
  --libdir=${prefix}/lib64
 
  --libdir=${prefix}/lib64

Latest revision as of 19:52, 8 April 2011

Download the software

Binary form (and available as YUM repo);

http://software.nikhef.nl/dist/redhat/el5/mwsec/

Work from a Source RPM by downloading the lastest version here:

http://software.nikhef.nl/dist/redhat/el5/mwsec/SRPMS/

Perform an SVN checkout (trunk):

http://ndpfsvn.nikhef.nl/ro/mwsec/trunk/saml2-xacml2-c-lib

Perform an SVN checkout (Tagged):

http://ndpfsvn.nikhef.nl/ro/mwsec/tags/saml2-xacml2-c-lib/${CHOOSE_LATEST_TAGGED_VERSION}

Note: As latest version, currently this is "1_0_1". But this can change over time. Visit the link with a webbrowser.

As tarball, choose the latest version:

http://software.nikhef.nl/security/saml2-xacml2-c-lib/

Note: You can double check the download with the SHA1 and SHA256 files.


Manual Building

Set some proper environment variables for the build:

export prefix="/usr";
export srclocation=`pwd`
export gsoaplocation="${srclocation}/gsoap-2.7-build"
export CXXFLAGS=-fPIC

Set the option to make a SAML2-XACML2-C-Lib service to used threading. This is the default build option for both clients as service to be enabled.

export CPPFLAG="-DXACML_ADDING_THREADING" ; 

Untar the gSOAP tarball and move into the directory:

tar xzf gsoap-2.7.17.tar.gz
 cd ${srclocation}/gsoap-2.7

Run configure and make:

./configure --prefix=${prefix}
make

Use make install DESTDIR to stage the gSOAP builds in a proper directory. The safest option is somewhere in your current build root:

make DESTDIR=${gsoaplocation} install

Go into the XACML src dir:

cd ${srclocation}/xacml-1.0

Depending upon the type of source file download or check out you've performed, you might need to run autotool with:

./bootstrap

Configure of XACML with reference to gSOAP and run make:

./configure --with-gsoap=${gsoaplocation}/usr --disable-static
make

For installation on your system (into /usr/local)

sudo make install


For builds into a different location, like a stage dir or a private stage dir

Redo the following step like this, with a prefix of your choice (default in "/usr"): Configure of XACML with reference to gSOAP and run make:

./configure --prefix=${prefix}--with-gsoap=${gsoaplocation}/usr --disable-static
make

If you want to create a distribution worthy package, I recommend to do:

./configure --prefix=${prefix}--with-gsoap=${gsoaplocation}/usr --disable-static
make
make DESTDIR=/tmp/my_build install

Important notice for 64 bit Fedora / Red Hat

Use in BOTH configure commands the option:

--libdir=${prefix}/lib64