From 1d2f5551ac586421f84f7a2d6726ffcb9425a40c Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sun, 8 May 2011 22:48:26 -0400 Subject: [PATCH 01/29] ThirdParty: Adding bison, flex and m4 --- ThirdParty/AllMake.stage0 | 2 + ThirdParty/AllMake.stage1 | 31 +++- ThirdParty/AllMake.stage2 | 6 +- ThirdParty/AllMake.stage3 | 23 ++- ThirdParty/AllMake.stage4 | 7 +- ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec | 4 +- ThirdParty/rpmBuild/SPECS/Python-2.7.spec | 2 +- ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec | 153 ++++++++++++++++++ ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec | 4 +- ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec | 153 ++++++++++++++++++ ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 41 +++-- ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec | 7 +- ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec | 153 ++++++++++++++++++ ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 9 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec | 9 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec | 39 +++-- ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec | 13 +- .../qt-everywhere-opensource-src-4.7.0.spec | 19 +-- ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 2 +- .../tools/makeThirdPartyFunctionsForRPM | 78 ++++++--- etc/prefs.sh-EXAMPLE | 11 +- etc/settings.sh | 43 ++++- 25 files changed, 705 insertions(+), 110 deletions(-) create mode 100644 ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec create mode 100644 ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec create mode 100644 ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec diff --git a/ThirdParty/AllMake.stage0 b/ThirdParty/AllMake.stage0 index 576c4311c..5730774ba 100755 --- a/ThirdParty/AllMake.stage0 +++ b/ThirdParty/AllMake.stage0 @@ -33,6 +33,8 @@ # NOTE: This stage is optional. Use it only if you want to move some RPMs # to the appropriate location for your architcture so the other stage scripts # will be able to pick them up +# +# Usage: ./AllMake.stage0 file_1.rpm file_2.rpm ... file_n.rpm # # Author: # Martin Beaudoin, Hydro-Quebec, (2010) diff --git a/ThirdParty/AllMake.stage1 b/ThirdParty/AllMake.stage1 index 52165649c..a87db0332 100755 --- a/ThirdParty/AllMake.stage1 +++ b/ThirdParty/AllMake.stage1 @@ -61,18 +61,35 @@ echo ======================================== echo # Gcc and companion libraries -#( rpm_make gmp-5.0.1 ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) -#( rpm_make mpfr-3.0.0 http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz ) -#( rpm_make gcc-4.4.5 ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz ) # -#( rpm_make mpc-0.8.2 http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz ) -#( rpm_make gcc-4.5.1 ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz ) +# You need gmp and mpfr for gcc-4.4.5 +# Uncomment the following 3 lines for gcc-4.4.5 +#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) +#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz ) +#( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz ) +# +# You need gmp, mpfr and mpc for gcc-4.5.1 +# Uncomment the following 4 lines for gcc-4.5.1 +#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) +#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz ) +#( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz ) +#( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz ) # Python -#( rpm_make Python-2.7 http://www.python.org/ftp/python/2.7/Python-2.7.tgz ) +#( rpm_make -p Python-2.7 -s Python-2.7.spec -u http://www.python.org/ftp/python/2.7/Python-2.7.tgz ) + +# m4 +# You need a recent version of m4 in order to compile a recent version of bison +#( rpm_make -p m4-1.4.16 -s m4-1.4.16.spec -u http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz ) + +# bison +#( rpm_make -p bison-2.4.3 -s bison-2.4.3.spec -u http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz ) + +# flex +#( rpm_make -p flex-2.5.35 -s flex-2.5.35.spec -u http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz ) # cmake -( rpm_make cmake-2.8.3 http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz ) +( rpm_make -p cmake-2.8.3 -s cmake-2.8.3.spec -u http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz ) echo ======================================== echo Done ThirdParty AllMake: Stage1 diff --git a/ThirdParty/AllMake.stage2 b/ThirdParty/AllMake.stage2 index 2454c2d16..9f8f81e24 100755 --- a/ThirdParty/AllMake.stage2 +++ b/ThirdParty/AllMake.stage2 @@ -65,9 +65,9 @@ echo if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ] then # MPI - #( rpm_make openmpi-1.4.1 http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz ) - ( rpm_make openmpi-1.4.3 http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz ) - #( rpm_make openmpi-1.5 http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz ) + #( rpm_make -p openmpi-1.4.1 -s openmpi-1.4.1.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz ) + #( rpm_make -p openmpi-1.5 -s openmpi-1.5.spec -u http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz ) + ( rpm_make -p openmpi-1.4.3 -s openmpi-1.4.3.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz ) else echo "Using system installed OpenMPI" echo "" diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 index 6cb28794a..39110a3b3 100755 --- a/ThirdParty/AllMake.stage3 +++ b/ThirdParty/AllMake.stage3 @@ -59,7 +59,7 @@ echo # Metis if [ -z "$METIS_SYSTEM" ] then - ( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz ) + ( rpm_make -p metis-5.0pre2 -s metis-5.0pre2.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz ) else echo "Using system installed Metis" echo "" @@ -68,7 +68,7 @@ fi # ParMGridGen if [ -z "$PARMGRIDGEN_SYSTEM" ] then - ( rpm_make ParMGridGen-1.0 http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz ) + ( rpm_make -p ParMGridGen-1.0 -s ParMGridGen-1.0.spec -u http://www.mgnet.org/mgnet/Codes/parmgridgen/ParMGridGen-1.0.tar.gz ) else echo "Using system installed ParMGridGen" echo "" @@ -77,7 +77,7 @@ fi # Libccmio if [ -z "$LIBCCMIO_SYSTEM" ] then - ( rpm_make libccmio-2.6.1 https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz ) + ( rpm_make -p libccmio-2.6.1 -s libccmio-2.6.1.spec -u https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz ) else echo "Using system installed Libccmio" echo "" @@ -86,13 +86,13 @@ fi # Mesquite if [ -z "$MESQUITE_SYSTEM" ] then - ( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz ) + ( rpm_make -p mesquite-2.1.2 -s mesquite-2.1.2.spec -u http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz ) else echo "Using system installed Mesquite" echo "" fi -# The following two packages depends on the availability of OpenMPI +# The following three packages depends on the availability of OpenMPI # The macro rpm_make() will make sure to update the ThirdParty environment variables before starting # the compilation. # Just make sure the OpenMPI environment variables are properly initialized, or that @@ -101,7 +101,7 @@ fi # Scotch if [ -z "$SCOTCH_SYSTEM" ] then - ( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz ) + ( rpm_make -p scotch-5.1.10b -s scotch-5.1.10b.spec -u https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz ) else echo "Using system installed Scotch" echo "" @@ -110,12 +110,21 @@ fi # ParMetis if [ -z "$PARMETIS_SYSTEM" ] then - ( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz ) + ( rpm_make -p ParMetis-3.1.1 -s ParMetis-3.1.1.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz ) else echo "Using system installed ParMetis" echo "" fi +# Zoltan +if [ -z "$ZOLTAN_SYSTEM" ] +then + ( rpm_make -p zoltan-3.5 -s zoltan-3.5.spec -u http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.5.tar.gz ) +else + echo "Using system installed Zoltan" + echo "" +fi + echo ======================================== echo Done ThirdParty AllMake: Stage3 echo ======================================== diff --git a/ThirdParty/AllMake.stage4 b/ThirdParty/AllMake.stage4 index 6162e8799..106fda1fa 100755 --- a/ThirdParty/AllMake.stage4 +++ b/ThirdParty/AllMake.stage4 @@ -59,7 +59,7 @@ echo # qt-everywhere-opensource-src-4.7.0 if [ ! -z "$QT_THIRD_PARTY" ] then - ( rpm_make qt-everywhere-opensource-src-4.7.0 http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz ) + ( rpm_make -p qt-everywhere-opensource-src-4.7.0 -s qt-everywhere-opensource-src-4.7.0.spec -u http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz ) else echo "Using system installed QT" echo "" @@ -69,9 +69,12 @@ fi # Paraview if [ -z "$PARAVIEW_SYSTEM" ] then + # Make sure we get the value of QT_BIN_DIR initialized + . $WM_PROJECT_DIR/etc/settings.sh + if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ] then - ( rpm_make ParaView-3.8.1 http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \ + ( rpm_make -p ParaView-3.8.1 -s ParaView-3.8.1.spec -u http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \ -D '_qmakePath $QT_BIN_DIR/qmake' ) else diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec index 24c0c6c5b..b79d01354 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec @@ -166,7 +166,7 @@ Patch0: ParaView-3.8.1.patch_darwin cd ./buildObj cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT%{_installPrefix} \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \ $CMAKE_VARIABLES \ .. @@ -185,7 +185,7 @@ Patch0: ParaView-3.8.1.patch_darwin export NO_BRP_STALE_LINK_ERROR=yes cd buildObj - make install + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec index 460f33402..1386322da 100644 --- a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec +++ b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec @@ -99,7 +99,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec new file mode 100644 index 000000000..cdd993abf --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec @@ -0,0 +1,153 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for bison-2.4.3 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2011) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name bison +%define release %{_WM_OPTIONS} +%define version 2.4.3 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: bison +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://ftp.gnu.org/gnu/bison +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + + ./configure \ + --prefix=%{_installPrefix} + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + make install DESTDIR=$RPM_BUILD_ROOT + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export BISON_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +[ -d \$BISON_DIR/lib ] && _foamAddLib \$BISON_DIR/lib + +# Enable access to the package applications if present +[ -d \$BISON_DIR/bin ] && _foamAddPath \$BISON_DIR/bin +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv BISON_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +if ( -e \$BISON_DIR/lib ) then + _foamAddLib \$BISON_DIR/lib +endif + +if ( -e \$BISON_DIR/bin ) then + _foamAddPath \$BISON_DIR/bin +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec index b56970d5d..e90fe624c 100644 --- a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec @@ -93,13 +93,13 @@ Group: Development/Tools [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" ./configure \ - --prefix=$RPM_BUILD_ROOT/%{_installPrefix} + --prefix=%{_installPrefix} [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec new file mode 100644 index 000000000..45ccf8f67 --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec @@ -0,0 +1,153 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for flex-2.5.35 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2011) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name flex +%define release %{_WM_OPTIONS} +%define version 2.5.35 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: flex +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35 +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + + ./configure \ + --prefix=%{_installPrefix} + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + make install DESTDIR=$RPM_BUILD_ROOT + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export FLEX_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +[ -d \$FLEX_DIR/lib ] && _foamAddLib \$FLEX_DIR/lib + +# Enable access to the package applications if present +[ -d \$FLEX_DIR/bin ] && _foamAddPath \$FLEX_DIR/bin +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv FLEX_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +if ( -e \$FLEX_DIR/lib ) then + _foamAddLib \$FLEX_DIR/lib +endif + +if ( -e \$FLEX_DIR/bin ) then + _foamAddPath \$FLEX_DIR/bin +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index fb322474d..a2a3fa7d3 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -95,6 +95,10 @@ Group: Development/Tools GMP_VERSION=gmp-5.0.1 MPFR_VERSION=mpfr-3.0.0 + # Set LD_LIBRARY_FILE for GMP and MPFR so configure won't fail some of the tests + export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH + mkdir ./objBuildDir cd ./objBuildDir @@ -111,7 +115,7 @@ Group: Development/Tools %install cd ./objBuildDir - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -126,12 +130,13 @@ cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh # Load %{name}-%{version} libraries and binaries if available # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export GCC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +export WM_COMPILER_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS -[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib +[ -d \$WM_COMPILER_DIR/lib ] && _foamAddLib \$WM_COMPILER_DIR/lib +[ -d \$WM_COMPILER_DIR/lib64 ] && _foamAddLib \$WM_COMPILER_DIR/lib64 # Enable access to the package applications if present -[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin +[ -d \$WM_COMPILER_DIR/bin ] && _foamAddPath \$WM_COMPILER_DIR/bin DOT_SH_EOF # @@ -140,28 +145,30 @@ DOT_SH_EOF cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh # Load %{name}-%{version} libraries and binaries if available # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -setenv GCC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +setenv WM_COMPILER_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS -if ( -e \$GCC_DIR/lib ) then - _foamAddLib \$GCC_DIR/lib +if ( -e \$WM_COMPILER_DIR/lib ) then + _foamAddLib \$WM_COMPILER_DIR/lib endif -if ( -e \$GCC_DIR/bin ) then - _foamAddPath \$GCC_DIR/bin +if ( -e \$WM_COMPILER_DIR/lib64 ) then + _foamAddLib \$WM_COMPILER_DIR/lib64 +endif + +if ( -e \$WM_COMPILER_DIR/bin ) then + _foamAddPath \$WM_COMPILER_DIR/bin endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + %clean rm -rf %{buildroot} %files %defattr(-,root,root) -%{_installPrefix}/bin -%{_installPrefix}/etc -%{_installPrefix}/include -%{_installPrefix}/info -%{_installPrefix}/lib -%{_installPrefix}/libexec -%{_installPrefix}/man -%{_installPrefix}/share +%{_installPrefix} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index b9895e42e..42532e7f0 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -113,7 +113,7 @@ Group: Development/Tools %install cd ./objBuildDir - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec index b71edccee..2f32ff770 100644 --- a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec @@ -97,7 +97,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -137,6 +137,11 @@ if ( -e \$GMP_DIR/bin ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec new file mode 100644 index 000000000..832a75993 --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec @@ -0,0 +1,153 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for m4-1.4.16 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name m4 +%define release %{_WM_OPTIONS} +%define version 1.4.16 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: m4 +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://ftp.gnu.org/gnu/m4 +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + + ./configure \ + --prefix=%{_installPrefix} + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + make install DESTDIR=$RPM_BUILD_ROOT + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export M4_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +[ -d \$M4_DIR/lib ] && _foamAddLib \$M4_DIR/lib + +# Enable access to the package applications if present +[ -d \$M4_DIR/bin ] && _foamAddPath \$M4_DIR/bin +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv M4_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +if ( -e \$M4_DIR/lib ) then + _foamAddLib \$M4_DIR/lib +endif + +if ( -e \$M4_DIR/bin ) then + _foamAddPath \$M4_DIR/bin +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index 5d67eb675..1920eb8af 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -111,7 +111,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index 6423874a7..e5fde9556 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -104,7 +104,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index 9921b7ea3..2bd954e30 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -100,7 +100,8 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOTbg + # Creation of OpenFOAM specific .csh and .sh files" @@ -140,6 +141,12 @@ if ( -e \$MPFR_DIR/bin ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec index 052c73447..f0e1f5c9d 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec @@ -97,6 +97,9 @@ Group: Development/Tools if [ -n "$SGE_ROOT" ] then mpiWith="$mpiWith --with-sge" + else + mpiWith="$mpiWith --without-sge" + mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine" fi # Infiniband support @@ -107,7 +110,8 @@ Group: Development/Tools # fi ./configure \ - --prefix=$RPM_BUILD_ROOT%{_installPrefix} \ + --prefix=%{_installPrefix} \ + --exec_prefix=%{_installPrefix} \ --disable-mpirun-prefix-by-default \ --disable-orterun-prefix-by-default \ --enable-shared --disable-static \ @@ -115,6 +119,7 @@ Group: Development/Tools --disable-mpi-f90 \ --disable-mpi-cxx \ --disable-mpi-profile \ + --without-slurm \ $mpiWith \ ; @@ -122,7 +127,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec index 531d7167c..f917269a2 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec @@ -84,6 +84,7 @@ Group: Development/Tools %prep %setup -q + %build # export WM settings in a form that GNU configure recognizes [ -n "$WM_CC" ] && export CC="$WM_CC" @@ -93,36 +94,42 @@ Group: Development/Tools [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" unset mpiWith - # enable GridEngine if it appears to be in use + # Enable GridEngine if it appears to be in use + # If you don't want any integration with SGE, simply unset the SGE + # environment variable if [ -n "$SGE_ROOT" ] then mpiWith="$mpiWith --with-sge" + else + mpiWith="$mpiWith --without-sge" + mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine" fi - # Infiniband support - # if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ] - # then - # mpiWith="$mpiWith --with-openib=/usr/local/ofed" - # mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64" - # fi + # Infiniband support + # Adjust according to your local paths + # if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ] + # then + # mpiWith="$mpiWith --with-openib=/usr/local/ofed" + # mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64" + # fi ./configure \ - --prefix=$RPM_BUILD_ROOT%{_installPrefix} \ + --prefix=%{_installPrefix} \ + --exec_prefix=%{_installPrefix} \ --disable-mpirun-prefix-by-default \ --disable-orterun-prefix-by-default \ --enable-shared --disable-static \ --disable-mpi-f77 \ --disable-mpi-f90 \ --disable-mpi-cxx \ - --disable-mpi-profile \ - $mpiWith \ - ; + --without-slurm \ + --disable-mpi-profile $mpiWith [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -136,7 +143,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh # Load %{name}-%{version} libraries and binaries # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3/platforms/\$WM_OPTIONS +export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS export OPENMPI_BIN_DIR=\$OPENMPI_DIR/bin export OPENMPI_LIB_DIR=\$OPENMPI_DIR/lib @@ -160,7 +167,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS if [ "\$FOAM_VERBOSE" -a "\$PS1" ] then - echo "Using system installed OpenMPI:" + echo " Environment variables defined for OpenMPI:" echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR" echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR" echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR" @@ -209,7 +216,7 @@ setenv PLIBS "\$OPENMPI_LINK_FLAGS" if (\$?FOAM_VERBOSE && \$?prompt) then - echo "Using system installed OpenMPI:" + echo " Environment variables defined for OpenMPI:" echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR" echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR" echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR" @@ -229,4 +236,4 @@ rm -rf %{buildroot} %files %defattr(-,root,root) -%{_installPrefix}/* +%{_installPrefix} diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec index a1910c650..3ee0c4a75 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec @@ -97,6 +97,9 @@ Group: Development/Tools if [ -n "$SGE_ROOT" ] then mpiWith="$mpiWith --with-sge" + else + mpiWith="$mpiWith --without-sge" + mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine" fi # Infiniband support @@ -107,13 +110,15 @@ Group: Development/Tools # fi ./configure \ - --prefix=$RPM_BUILD_ROOT%{_installPrefix} \ + --prefix=%{_installPrefix} \ + --exec_prefix=%{_installPrefix} \ --disable-mpirun-prefix-by-default \ --disable-orterun-prefix-by-default \ --enable-shared --disable-static \ --disable-mpi-f77 \ --disable-mpi-f90 \ --disable-mpi-cxx \ + --without-slurm \ --disable-mpi-profile \ $mpiWith \ ; @@ -122,7 +127,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -160,7 +165,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS if [ "\$FOAM_VERBOSE" -a "\$PS1" ] then - echo "Using system installed OpenMPI:" + echo " Environment variables defined for OpenMPI:" echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR" echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR" echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR" @@ -209,7 +214,7 @@ setenv PLIBS \`echo \$OPENMPI_LINK_FLAGS\` if (\$?FOAM_VERBOSE && \$?prompt) then - echo "Using system installed OpenMPI:" + echo " Environment variables defined for OpenMPI:" echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR" echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR" echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR" diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index 5be7a7675..8f1cc8069 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -97,14 +97,18 @@ Group: Development/Tools ./configure \ -opensource --confirm-license=yes \ + -release -shared \ + -nomake examples -nomake demos \ --prefix=%{_installPrefix} + # Explicitely specify LD_LIBRARY_PATH so it can find QT own libraries + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/lib + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 make -j $WM_NCOMPPROCS %install -# make install INSTALL_ROOT=$RPM_BUILD_ROOT%{_installPrefix} - make install INSTALL_ROOT=$RPM_BUILD_ROOT + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -145,15 +149,6 @@ rm -rf %{buildroot} %files %defattr(-,root,root) -%{_installPrefix}/bin -%{_installPrefix}/etc -%{_installPrefix}/lib -%{_installPrefix}/imports -%{_installPrefix}/include -%{_installPrefix}/mkspecs -%{_installPrefix}/plugins -%{_installPrefix}/phrasebooks -%{_installPrefix}/q3porting.xml -%{_installPrefix}/translations +%{_installPrefix} diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index 9b4fd18d4..5d2455818 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -109,7 +109,7 @@ Patch0: scotch-5.1.10b_patch_0 %install cd src mkdir -p $RPM_BUILD_ROOT%{_installPrefix} - make install prefix=$RPM_BUILD_ROOT%{_installPrefix} + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/tools/makeThirdPartyFunctionsForRPM b/ThirdParty/tools/makeThirdPartyFunctionsForRPM index c1454226f..ee13a020e 100755 --- a/ThirdParty/tools/makeThirdPartyFunctionsForRPM +++ b/ThirdParty/tools/makeThirdPartyFunctionsForRPM @@ -49,13 +49,39 @@ echo "" # rpm_make() { - package="$1" + # sort arguments + _PACKAGE='' + _SPECFILE='' + _PACKAGE_URL='' + _ADDITIONALFLAGS='' + + while getopts p:s:u:a: flags + do + case $flags in + p) _PACKAGE=$OPTARG + ;; + u) _PACKAGE_URL=$OPTARG + ;; + s) _SPECFILE=$OPTARG + ;; + a) _ADDITIONALFLAGS=$OPTARG + ;; + esac + done + + echo "Package name : $_PACKAGE" + echo "Package URL : $_PACKAGE_URL" + echo "RPM spec file name: $_SPECFILE" + echo "Additional flags : $_ADDITIONALFLAGS" + + # Shift options + shift `expr $OPTIND - 1` # Make sure the ThirdParty environment is up-to-date - echo "Updating the ThirdParty environment variables before building package $package" + echo "Updating the ThirdParty environment variables before building package $_PACKAGE" . $WM_PROJECT_DIR/etc/settings.sh - rpmName=$package-$WM_OPTIONS.$architecture + rpmName=$_PACKAGE-$WM_OPTIONS.$architecture rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm # We check immediatly if the RPM binary package is available in the local RPMs vault. @@ -75,36 +101,36 @@ rpm_make() # If more than 2 command-line parameters are supplied, we assume that these additional parameters # are for the command rpmbuild. # This is a bit fragile, improvements will come later if necessary. - # - [ "$#" -ge 2 ] && { - packageURL="$2" - packageTarBall=`basename $packageURL` + # + # Do we need to download the package using the supplied URL + if [ -n "$_PACKAGE_URL" ]; then + packageTarBall=`basename $_PACKAGE_URL` if [ ! -e "SOURCES/$packageTarBall" ]; then - echo "Download $packageTarBall from : $packageURL" - ( cd SOURCES; wget --no-check-certificate $packageURL ) + echo "Download $packageTarBall from : $_PACKAGE_URL" + ( cd SOURCES; wget --no-check-certificate $_PACKAGE_URL ) fi - } + fi - [ "$#" -gt 2 ] && { - # We will pass the rest of the command-line arguments to rpmbuild - shift 2 - } - - echo "Making package $package using RPM." - rpm_build $package "$@" + echo "Making package $_PACKAGE using RPM." + rpm_build $_PACKAGE $_SPECFILE $_ADDITIONALFLAGS "$@" fi # Install RPM package if not done already - if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$package/platforms/$WM_OPTIONS" ]; then - echo "Installing package: $package" - rpm_uninstall $package - rpm_install $package + if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$_PACKAGE/platforms/$WM_OPTIONS" ]; then + echo "Installing package: $_PACKAGE" + rpm_uninstall $_PACKAGE + rpm_install $_PACKAGE else - echo "Package $package is already installed" + echo "Package $_PACKAGE is already installed" fi - echo "Done installing package $package" + unset _PACKAGE + unset _SPECFILE + unset _PACKAGE_URL + unset _ADDITIONALFLAGS + + echo "Done installing package $_PACKAGE" echo "" } @@ -114,8 +140,8 @@ rpm_make() rpm_build() { package="$1" - shift - specFile="$package.spec" + specFile="$2" + shift 2 cd $buildBase @@ -125,7 +151,7 @@ rpm_build() } #Build RPM package - echo "Building package $package" + echo "Building package $package using SPEC file : $specFile. Optional args: $@" #rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@" # # Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations diff --git a/etc/prefs.sh-EXAMPLE b/etc/prefs.sh-EXAMPLE index b05e5e7ca..18c931580 100644 --- a/etc/prefs.sh-EXAMPLE +++ b/etc/prefs.sh-EXAMPLE @@ -40,7 +40,7 @@ export FOAM_VERBOSE=1 # Specify system compiler # ~~~~~~~~~~~~~~~~~~~~~~~ -compilerInstall=system +compilerInstall=System # Specify system openmpi # ~~~~~~~~~~~~~~~~~~~~~~ @@ -142,6 +142,15 @@ compilerInstall=system #export PARAVIEW_DIR=path_to_system_installed_paraview #export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin +# System installed bison +#export BISON_SYSTEM=1 + +# System installed flex +#export FLEX_SYSTEM=1 + +# System installed m4 +#export M4_SYSTEM=1 + # Specify ParaView version # ~~~~~~~~~~~~~~~~~~~~~~~~ #export ParaView_VERSION=git # eg, cvs/git version diff --git a/etc/settings.sh b/etc/settings.sh index 13d068e1a..b9ecd655b 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -120,8 +120,13 @@ unset compilerBin compilerLib # Select compiler installation # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # compilerInstall = OpenFOAM | System +# +# We can override the value of compilerInstall from prefs.sh +: ${compilerInstall:=System} + +# Or we can force it right here #compilerInstall=OpenFOAM -compilerInstall=System +#compilerInstall=System case "${compilerInstall:-OpenFOAM}" in OpenFOAM) @@ -131,6 +136,11 @@ OpenFOAM) _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib ;; + Gcc44) + _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.0/platforms/$WM_OPTIONS/etc/mpfr-3.0.0.sh + _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh + _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh + ;; Gcc43) export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib @@ -272,7 +282,7 @@ SYSTEMOPENMPI) if [ "$FOAM_VERBOSE" -a "$PS1" ] then - echo "Using system installed OpenMPI:" + echo " Environment variables defined for OpenMPI:" echo " OPENMPI_BIN_DIR : $OPENMPI_BIN_DIR" echo " OPENMPI_LIB_DIR : $OPENMPI_LIB_DIR" echo " OPENMPI_INCLUDE_DIR : $OPENMPI_INCLUDE_DIR" @@ -475,6 +485,35 @@ export MPI_BUFFER_SIZE } [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR" +# Load m4 +# ~~~~~~~~~~ +[ -z "$M4_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/m4-1.4.16 ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS/etc/m4-1.4.16.sh +} +[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " M4_DIR is initialized to: $M4_DIR" + +# Load bison +# ~~~~~~~~~~ +[ -z "$BISON_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/bison-2.4.3 ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/bison-2.4.3/platforms/$WM_OPTIONS/etc/bison-2.4.3.sh +} +[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " BISON_DIR is initialized to: $BISON_DIR" + +# Load flex +# ~~~~~~~~~~ +[ -z "$FLEX_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/flex-2.5.35 ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/flex-2.5.35/platforms/$WM_OPTIONS/etc/flex-2.5.35.sh +} +[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " FLEX_DIR is initialized to: $FLEX_DIR" + + +# Load zoltan +# ~~~~~~~~~~ +[ -z "$ZOLTAN_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/zoltan_3.5 ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/zoltan_3.5/platforms/$WM_OPTIONS/etc/zoltan_3.5.sh +} +[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " ZOLTAN_DIR is initialized to: $ZOLTAN_DIR" + # Load Python # ~~~~~~~~~~~ From 983856d40929fd16e038805df9d52df34ae4a966 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Tue, 10 May 2011 21:16:29 -0400 Subject: [PATCH 02/29] ThirdParty: Correction for compiling ParaView with available qmake --- ThirdParty/AllMake.stage4 | 3 +-- ThirdParty/tools/makeThirdPartyFunctionsForRPM | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ThirdParty/AllMake.stage4 b/ThirdParty/AllMake.stage4 index 106fda1fa..6ad93857e 100755 --- a/ThirdParty/AllMake.stage4 +++ b/ThirdParty/AllMake.stage4 @@ -65,7 +65,6 @@ else echo "" fi - # Paraview if [ -z "$PARAVIEW_SYSTEM" ] then @@ -75,7 +74,7 @@ then if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ] then ( rpm_make -p ParaView-3.8.1 -s ParaView-3.8.1.spec -u http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \ - -D '_qmakePath $QT_BIN_DIR/qmake' + -a --define='_qmakePath $QT_BIN_DIR/qmake' ) else echo "WARNING: " diff --git a/ThirdParty/tools/makeThirdPartyFunctionsForRPM b/ThirdParty/tools/makeThirdPartyFunctionsForRPM index ee13a020e..7671642f9 100755 --- a/ThirdParty/tools/makeThirdPartyFunctionsForRPM +++ b/ThirdParty/tools/makeThirdPartyFunctionsForRPM @@ -49,6 +49,9 @@ echo "" # rpm_make() { + # Avoid word splitting on 'space' + IFS=$'\n' + # sort arguments _PACKAGE='' _SPECFILE='' @@ -96,11 +99,6 @@ rpm_make() # cd $buildBase - # Here, the logic is fairly simple: - # We assume that the 2nd command-line parameter is necessarily the URL for dowmloading the package. - # If more than 2 command-line parameters are supplied, we assume that these additional parameters - # are for the command rpmbuild. - # This is a bit fragile, improvements will come later if necessary. # # Do we need to download the package using the supplied URL if [ -n "$_PACKAGE_URL" ]; then @@ -113,7 +111,7 @@ rpm_make() fi echo "Making package $_PACKAGE using RPM." - rpm_build $_PACKAGE $_SPECFILE $_ADDITIONALFLAGS "$@" + rpm_build ${_PACKAGE} ${_SPECFILE} ${_ADDITIONALFLAGS} "$@" fi # Install RPM package if not done already From 6ee76fab7bb9d236317fe5436d29999b402e8384 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 11:29:15 -0400 Subject: [PATCH 03/29] ThirdParty: correction of spec files for installation of qt and scotch --- .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 4 +++- ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index 8f1cc8069..e1d2a199c 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -108,7 +108,9 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install DESTDIR=$RPM_BUILD_ROOT + # Makefiles generated by qmake do not to support the DESTDIR= option + # We need to use the INSTALL_ROOT= option instead + make install INSTALL_ROOT=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index 5d2455818..9b4fd18d4 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -109,7 +109,7 @@ Patch0: scotch-5.1.10b_patch_0 %install cd src mkdir -p $RPM_BUILD_ROOT%{_installPrefix} - make install DESTDIR=$RPM_BUILD_ROOT + make install prefix=$RPM_BUILD_ROOT%{_installPrefix} # Creation of OpenFOAM specific .csh and .sh files" From 70fd9f7b971b5c1abd3fa9a92806ea7777ec5997 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 11:51:00 -0400 Subject: [PATCH 04/29] ThirdParty: add Zoltan 3.5 to the list of packages, but don't activate the compilation yet --- ThirdParty/AllMake.stage3 | 16 +-- ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec | 152 ++++++++++++++++++++++ 2 files changed, 160 insertions(+), 8 deletions(-) create mode 100644 ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 index 39110a3b3..7f6555cbc 100755 --- a/ThirdParty/AllMake.stage3 +++ b/ThirdParty/AllMake.stage3 @@ -116,14 +116,14 @@ else echo "" fi -# Zoltan -if [ -z "$ZOLTAN_SYSTEM" ] -then - ( rpm_make -p zoltan-3.5 -s zoltan-3.5.spec -u http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.5.tar.gz ) -else - echo "Using system installed Zoltan" - echo "" -fi +## Zoltan +#if [ -z "$ZOLTAN_SYSTEM" ] +#then +# ( rpm_make -p zoltan-3.5 -s zoltan-3.5.spec -u http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.5.tar.gz ) +#else +# echo "Using system installed Zoltan" +# echo "" +#fi echo ======================================== echo Done ThirdParty AllMake: Stage3 diff --git a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec new file mode 100644 index 000000000..e2bc5dd2c --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec @@ -0,0 +1,152 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for Zoltan-3.5 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2011) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name zoltan +%define release %{_WM_OPTIONS} +%define version 3.5 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: zoltan +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions +Source: %url/zoltan_distrib_v%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q -n Zoltan_v3.5 + + +%build + mkdir buildDir + cd buildDir + ../configure \ + --with-mpi=$MPI_HOME \ + --prefix=%{_installPrefix} + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS everything + +%install + cd buildDir + make install DESTDIR=$RPM_BUILD_ROOT + cp ./src/include/Zoltan_config.h $RPM_BUILD_ROOT/%{_installPrefix}/include + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export ZOLTAN_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +[ -d \$ZOLTAN_DIR/lib ] && _foamAddLib \$ZOLTAN_DIR/lib + +# Enable access to the package applications if present +[ -d \$ZOLTAN_DIR/bin ] && _foamAddPath \$ZOLTAN_DIR/bin +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv ZOLTAN_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +if ( -e \$ZOLTAN_DIR/lib ) then + _foamAddLib \$ZOLTAN_DIR/lib +endif + +if ( -e \$ZOLTAN_DIR/bin ) then + _foamAddPath \$ZOLTAN_DIR/bin +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + + (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + From 83b9a79d635b59f3cee08dbc7a472f250e5404e1 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 13:58:02 -0400 Subject: [PATCH 05/29] ThirdParty: building process now generates packages in both .rpm and .tgz formats --- ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec | 4 ++++ ThirdParty/rpmBuild/SPECS/Python-2.7.spec | 4 ++++ ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec | 3 +-- ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec | 4 ++++ ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec | 4 +--- ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 3 +-- ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec | 3 +-- ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec | 3 +-- ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 3 +-- ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec | 5 +++++ .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 5 +++++ ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec | 3 +-- 22 files changed, 79 insertions(+), 15 deletions(-) diff --git a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec index 24e1f47c8..7265fef5f 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec @@ -150,6 +150,11 @@ if ( -e \$PARMGRIDGEN_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec index bc18ccb53..70b728ef6 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec @@ -157,6 +157,11 @@ if ( -e \$PARMETIS_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec index b79d01354..c16508bc3 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec @@ -259,6 +259,10 @@ if ( -e \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + %clean %files diff --git a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec index 1386322da..40bab7aa5 100644 --- a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec +++ b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec @@ -135,6 +135,10 @@ if ( -e \$PYTHON_BIN_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec index cdd993abf..4427574c6 100644 --- a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec @@ -140,8 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec index e90fe624c..be1d13cce 100644 --- a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec @@ -135,6 +135,10 @@ if ( -e \$CMAKE_BIN_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec index 45ccf8f67..44ae22fb3 100644 --- a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec +++ b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec @@ -140,9 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) - + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index a2a3fa7d3..a00e02b07 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -162,8 +162,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index 42532e7f0..49e7ad0b3 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -153,6 +153,11 @@ if ( -e \$GCC_DIR/bin ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec index 2f32ff770..7e7e2c3ff 100644 --- a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec @@ -139,8 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec index 8bab94d43..67ec3ea73 100644 --- a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec +++ b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec @@ -169,6 +169,11 @@ if ( -e \$LIBCCMIO_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec index 832a75993..a6caf6d60 100644 --- a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec +++ b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec @@ -140,8 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index 1920eb8af..c98f066ed 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -156,6 +156,11 @@ if ( -e \$MESQUITE_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec index 5751ee275..8bd10ba0f 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec @@ -158,6 +158,11 @@ if ( -e \$METIS_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index e5fde9556..9d0d38b85 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -144,6 +144,11 @@ if ( -e \$MPC_DIR/bin ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index 2bd954e30..e2f28170a 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -143,8 +143,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec index f0e1f5c9d..eb26e4443 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec @@ -167,6 +167,11 @@ if ( -e \$OPENMPI_DIR/bin ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec index f917269a2..78ae8149c 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec @@ -231,6 +231,11 @@ if (\$?FOAM_VERBOSE && \$?prompt) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec index 3ee0c4a75..a4c2f67cd 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec @@ -229,6 +229,11 @@ if (\$?FOAM_VERBOSE && \$?prompt) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index e1d2a199c..e9072fa9f 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -146,6 +146,11 @@ if ( -e \$QT_BIN_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index 9b4fd18d4..d6334b22a 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -154,6 +154,11 @@ if ( -e \$SCOTCH_LIB_DIR ) then endif DOT_CSH_EOF + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + + %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec index e2bc5dd2c..4cdfc5ed5 100644 --- a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec +++ b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec @@ -139,8 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - - (cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean From a723c7ec7f991747a242d7b905fb56399ee719ab Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 14:08:03 -0400 Subject: [PATCH 06/29] ThirdParty: building process now generates packages in both .rpm and .tgz formats. Add comments in README.ThirdParty --- ThirdParty/README.ThirdParty | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ThirdParty/README.ThirdParty b/ThirdParty/README.ThirdParty index 90cb78350..27afd38d6 100644 --- a/ThirdParty/README.ThirdParty +++ b/ThirdParty/README.ThirdParty @@ -12,7 +12,7 @@ The whole process needs to run and install in user-space, without the need to be Here is what's available: a: A set of rpm spec files for specific ThirdParty packages. - b: A suite of bash scripts to automate the complete sequence of downloading, compiling, installing and generating RPMs. + b: A suite of bash scripts to automate the complete sequence of downloading, compiling, installing and generating RPMs. c: An empty directory structure pre-configured and ready to proceed with the download, compilation and installation of chosen ThirdParty packages for OF-1.6-ext. @@ -55,12 +55,18 @@ Quick description of the main scripts: For every packages, this is the basic process we will be going through when starting building the ThirdParty packages from scratch:: - a: Verify in the local "RPM vault" if a RPM is available for a given package + a: Verify in the local "RPM vault" if a RPM file is available for a given package b: If it is, simply install this RPM and move on to the next package c: if the RPM is absent: i: verify if the source tarbal is available from the SOURCES "vault" ii: if it is not, download the tarball using the specified URL. - iii: proceed with the extraction, patching, configuration, compilation, RPM generation and installation of the package. The generated RPM is always used for installation. + iii: proceed with the extraction, patching, configuration, compilation, RPM generation and installation of the package. + The generated RPM is always used for installation. + + Important notice: + Please note that a compressed tarball (.tgz) is now also generated for systems where using rpm for installing packages + as a non-root user might be a problem. + d: The default installation root directory is "$WM_THIRD_PARTY_DIR". This can be overriden though when installing the RPM. Relocating the RPM root installation directory: @@ -72,11 +78,12 @@ Relocating the RPM root installation directory: The Relocations path is the actual location pointed by the $WM_THIRD_PARTY_DIR on my laptop when I generated the RPM. It is the indication that the RPM is relocatable - This path will turn to be hardcoded in the RPM because the environment variable was expanded before generating the RPM.. + This path will end up being hardcoded in the RPM because the environment variable was expanded before generating the RPM.. This is the default root directory where the RPM will install its "payload" This can be overridden using the 'rpm' command-line parameter --relocate OLDPATH=NEWPATH . - For example, let's say you want to install the RPM under the root directory /tmp/someDir instead, you will call the 'rpm' command like this: + For example, let's say you want to install the RPM under the root directory /tmp/someDir instead. + You will need to call the 'rpm' command like this: rpm -ivh ./cmake-2.8.3-darwinIntelGccDPOpt.i386.rpm --relocate /Users/beaudoin/Projets/SAMH/OpenFOAM/ThirdParty-1.6-ext-RPM-based=/tmp/someDir @@ -99,5 +106,5 @@ To be continued... Martin Beaudoin -Novembre 2010 +May 2011 \ No newline at end of file From 5877080cb2f4da8eb80997184360920421f6cadc Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 14:21:03 -0400 Subject: [PATCH 07/29] ThirdParty: some more comments, and adjustments to path of generated .tgz files --- ThirdParty/README.ThirdParty | 3 +++ ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/Python-2.7.spec | 2 +- ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec | 2 +- ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 2 +- ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec | 2 +- ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec | 2 +- .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 2 +- ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec | 2 +- 23 files changed, 25 insertions(+), 22 deletions(-) diff --git a/ThirdParty/README.ThirdParty b/ThirdParty/README.ThirdParty index 27afd38d6..5b2752fc3 100644 --- a/ThirdParty/README.ThirdParty +++ b/ThirdParty/README.ThirdParty @@ -67,6 +67,9 @@ For every packages, this is the basic process we will be going through when star Please note that a compressed tarball (.tgz) is now also generated for systems where using rpm for installing packages as a non-root user might be a problem. + The .rpm files will be located under the directory $WM_THIRD_PARTY_DIR/rpmBuild/RPMS + The .tgz files will be located under the directory $WM_THIRD_PARTY_DIR/rpmBuild/TGZS + d: The default installation root directory is "$WM_THIRD_PARTY_DIR". This can be overriden though when installing the RPM. Relocating the RPM root installation directory: diff --git a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec index 7265fef5f..808326dc4 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec @@ -152,7 +152,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec index 70b728ef6..de64bb7ee 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec @@ -159,7 +159,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec index c16508bc3..1dc434ef5 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec @@ -261,7 +261,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec index 40bab7aa5..81646e4fa 100644 --- a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec +++ b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec @@ -137,7 +137,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec index 4427574c6..57452dec4 100644 --- a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec index be1d13cce..d05f0d574 100644 --- a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec @@ -137,7 +137,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec index 44ae22fb3..662aa88cf 100644 --- a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec +++ b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index a00e02b07..12677e897 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -162,7 +162,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index 49e7ad0b3..ea0ff02df 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -155,7 +155,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec index 7e7e2c3ff..3db121c68 100644 --- a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec @@ -139,7 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec index 67ec3ea73..0ae9540d5 100644 --- a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec +++ b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec @@ -171,7 +171,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec index a6caf6d60..f6e411281 100644 --- a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec +++ b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index c98f066ed..9ccfebc52 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -158,7 +158,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec index 8bd10ba0f..cda8ceb63 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec @@ -160,7 +160,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index 9d0d38b85..b8430bff2 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -146,7 +146,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index e2f28170a..5f85875e4 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -143,7 +143,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec index eb26e4443..9b6eef9dd 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec @@ -169,7 +169,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec index 78ae8149c..d6e83fc55 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec @@ -233,7 +233,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec index a4c2f67cd..2b4532bee 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec @@ -231,7 +231,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index e9072fa9f..8d3e14fcb 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -148,7 +148,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index d6334b22a..cd7ef4e91 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -156,7 +156,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec index 4cdfc5ed5..eed15c3d6 100644 --- a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec +++ b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec @@ -139,7 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZ; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZ/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean From 8b7d3ab9ca70e849bfb2192a909a109a30d314f7 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 12 May 2011 14:45:03 -0400 Subject: [PATCH 08/29] ThirdParty: adjustments to path of generated .tgz files --- ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/Python-2.7.spec | 2 +- ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec | 2 +- ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 2 +- ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec | 2 +- ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec | 2 +- .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 2 +- ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec index 808326dc4..c70299682 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec @@ -152,7 +152,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec index de64bb7ee..2628189cb 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec @@ -159,7 +159,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec index 1dc434ef5..83158bc52 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec @@ -261,7 +261,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec index 81646e4fa..55ad72c76 100644 --- a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec +++ b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec @@ -137,7 +137,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec index 57452dec4..02e752b9b 100644 --- a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec index d05f0d574..43b3ec9e9 100644 --- a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec @@ -137,7 +137,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec index 662aa88cf..1b6bc3dad 100644 --- a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec +++ b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index 12677e897..324799247 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -162,7 +162,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index ea0ff02df..21de9e39f 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -155,7 +155,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec index 3db121c68..cbb78a2d3 100644 --- a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec @@ -139,7 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean rm -rf %{buildroot} diff --git a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec index 0ae9540d5..0c9d7f39c 100644 --- a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec +++ b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec @@ -171,7 +171,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec index f6e411281..52c36eaa3 100644 --- a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec +++ b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec @@ -140,7 +140,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index 9ccfebc52..08ed23083 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -158,7 +158,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec index cda8ceb63..6f98ce07f 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec @@ -160,7 +160,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index b8430bff2..abeed4add 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -146,7 +146,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index 5f85875e4..de71330fe 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -143,7 +143,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec index 9b6eef9dd..ed46b93c0 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec @@ -169,7 +169,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec index d6e83fc55..18572e858 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec @@ -233,7 +233,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec index 2b4532bee..22498e38f 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec @@ -231,7 +231,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index 8d3e14fcb..d83cf27aa 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -148,7 +148,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index cd7ef4e91..8d7edf20d 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -156,7 +156,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean diff --git a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec index eed15c3d6..302cf6d5a 100644 --- a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec +++ b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec @@ -139,7 +139,7 @@ DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages # as a non-root user might be a problem. - (mkdir -p %{_topdir}/TGZS; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{name}-%{version}.tgz packages/%{name}-%{version}) + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) %clean From fd307430c52b666fd656396e017b41d1777899a6 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Fri, 13 May 2011 10:20:07 -0400 Subject: [PATCH 09/29] ThirdParty: modification of rpm invocation with extra param. for Ubuntu --- ThirdParty/tools/makeThirdPartyFunctionsForRPM | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ThirdParty/tools/makeThirdPartyFunctionsForRPM b/ThirdParty/tools/makeThirdPartyFunctionsForRPM index 7671642f9..87d82d441 100755 --- a/ThirdParty/tools/makeThirdPartyFunctionsForRPM +++ b/ThirdParty/tools/makeThirdPartyFunctionsForRPM @@ -33,15 +33,17 @@ buildBase=$WM_THIRD_PARTY_DIR/rpmBuild architecture=`rpm --eval "%{_target_cpu}"` -# Adjust the rpm command on Ubuntu system -rpm --force-debian >& /dev/null +RPM_CMD='rpm' +RPM_CMD_XTRA_OPTIONS='' + +# Adjust the rpm command options on Ubuntu/Debian based systems +${RPM_CMD} --force-debian >& /dev/null RETVAL=$? -[ $RETVAL -eq 0 ] && RPM_CMD="rpm --force-debian" #Success : Debian system -[ $RETVAL -ne 0 ] && RPM_CMD="rpm" #Failed : Non-Debian system +[ $RETVAL -eq 0 ] && RPM_CMD_XTRA_OPTIONS="--force-debian" #Success : Debian system echo "" -echo "This system rpm command: $RPM_CMD" +echo "This system rpm command: ${RPM_CMD} ${RPM_CMD_XTRA_OPTIONS}" echo "" # @@ -167,7 +169,7 @@ rpm_uninstall() cd $buildBase echo " Uninstalling $package using RPM: $rpmName" - $RPM_CMD -e $rpmName --dbpath $buildBase/rpmDB --norepackage >& /dev/null + ${RPM_CMD} ${RPM_CMD_XTRA_OPTIONS} -e $rpmName --dbpath $buildBase/rpmDB --norepackage >& /dev/null # Note: rpm will rant when uninstalling packages with an error message # starting with "error: LOOP:" @@ -186,7 +188,7 @@ rpm_install() rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm; echo " Installing $package using RPM file: $rpmFile"; - $RPM_CMD -ivh \ + ${RPM_CMD} ${RPM_CMD_XTRA_OPTIONS} -ivh \ $rpmFile \ --dbpath $buildBase/rpmDB --force --nodeps; From 91628f4ff6466a42f3d7b8335924bf103d618e46 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Fri, 13 May 2011 12:47:11 -0400 Subject: [PATCH 10/29] ThirdParty: disable the generation of debuginfo packages by rpm --- ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec | 3 +++ ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/Python-2.7.spec | 3 +++ ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec | 3 +++ ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec | 3 +++ ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec | 3 +++ ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 3 +++ ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec | 3 +++ ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 3 +++ ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec | 3 +++ ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 3 +++ ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 3 +++ ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec | 3 +++ ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec | 3 +++ ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec | 3 +++ .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 3 +++ ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec | 3 +++ ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec | 3 +++ 22 files changed, 66 insertions(+) diff --git a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec index c70299682..e38ccf3e9 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMGridGen-1.0.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec index 2628189cb..9c0710a53 100644 --- a/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParMetis-3.1.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec index 83158bc52..b7b76bb0a 100644 --- a/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec +++ b/ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec index 55ad72c76..2a87420a8 100644 --- a/ThirdParty/rpmBuild/SPECS/Python-2.7.spec +++ b/ThirdParty/rpmBuild/SPECS/Python-2.7.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec index 02e752b9b..e6e7754ea 100644 --- a/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec index 43b3ec9e9..6e4eb59e5 100644 --- a/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec index 1b6bc3dad..4fb8d8e8e 100644 --- a/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec +++ b/ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index 324799247..31941e23c 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index 21de9e39f..53760e18d 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec index cbb78a2d3..ab915a38e 100644 --- a/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec index 0c9d7f39c..dac587b5c 100644 --- a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec +++ b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec index 52c36eaa3..0b9a59439 100644 --- a/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec +++ b/ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index 08ed23083..492e3d99e 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec index 6f98ce07f..67e2d33c1 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index abeed4add..0d37623e7 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index de71330fe..711d15d0d 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec index ed46b93c0..187a3629f 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec index 18572e858..2304baa92 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec index 22498e38f..9f325a42a 100644 --- a/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec +++ b/ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index d83cf27aa..1723a2bb1 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec index 8d7edf20d..ec4a0712e 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-5.1.10b.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp diff --git a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec index 302cf6d5a..9723b1fac 100644 --- a/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec +++ b/ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec @@ -37,6 +37,9 @@ %{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} %{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} +# Disable the generation of debuginfo packages +%define debug_package %{nil} + # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _tmppath %{_topdir}/tmp From f9cdbd511e6f5e21d041fd9fe642e14d0f7153ca Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 14 May 2011 09:24:56 -0400 Subject: [PATCH 11/29] ThirdParty: some fixing and correcting a typo --- ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index 711d15d0d..1d37063a4 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -103,7 +103,7 @@ Group: Development/Tools make -j $WM_NCOMPPROCS %install - make install DESTDIR=$RPM_BUILD_ROOTbg + make install DESTDIR=$RPM_BUILD_ROOT # Creation of OpenFOAM specific .csh and .sh files" @@ -154,8 +154,5 @@ rm -rf %{buildroot} %files %defattr(-,root,root) -%{_installPrefix}/etc -%{_installPrefix}/include -%{_installPrefix}/lib -%{_installPrefix}/share +%{_installPrefix} From 410de58450de4d7f4f0015db4ec329cd28b11222 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 14 May 2011 09:30:52 -0400 Subject: [PATCH 12/29] ThirdParty: Darwin platforms: using Mac Ports compilers only when specifying System compiler option --- etc/bashrc | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index eb0968b74..aec1cc2a3 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -247,24 +247,27 @@ Darwin) # Make sure that binaries use the best features of the used OS-Version export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` - # Use Mac-Ports-Compiler instead of Apple-gcc-4.2 - case $WM_COMPILER in - Gcc43) - export WM_CC='gcc-mp-4.3' - export WM_CXX='g++-mp-4.3' - ;; - Gcc44) - export WM_CC='gcc-mp-4.4' - export WM_CXX='g++-mp-4.4' - ;; - Gcc45) - export WM_CC='gcc-mp-4.5' - export WM_CXX='g++-mp-4.5' - ;; - *) - export WM_COMPILER= - ;; - esac + if [ "$compilerInstall" == "System" ] + then + # Use Mac-Ports-Compiler instead of Apple-gcc-4.2 + case $WM_COMPILER in + Gcc43) + export WM_CC='gcc-mp-4.3' + export WM_CXX='g++-mp-4.3' + ;; + Gcc44) + export WM_CC='gcc-mp-4.4' + export WM_CXX='g++-mp-4.4' + ;; + Gcc45) + export WM_CC='gcc-mp-4.5' + export WM_CXX='g++-mp-4.5' + ;; + *) + export WM_COMPILER= + ;; + esac + fi ;; From 2e14a19a76464308e1073b9b26e6ebe8d34befd2 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 16 May 2011 15:56:12 -0400 Subject: [PATCH 13/29] ThirdParty: add some more information in the file README.ThirdParty --- ThirdParty/README.ThirdParty | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ThirdParty/README.ThirdParty b/ThirdParty/README.ThirdParty index 5b2752fc3..f8ab4ba64 100644 --- a/ThirdParty/README.ThirdParty +++ b/ThirdParty/README.ThirdParty @@ -105,9 +105,22 @@ Relocating the RPM root installation directory: b: Maybe adding some RPM dependencies might be useful. I have not explored this yet. + +10: Gotchas and solutions: + + Error messages from rpm: + ------------------------ + + Problem : error: can't create transaction lock on /var/lock/rpm/transaction + Solution: add the following entry in your file ~/.rpmmacros + + %_rpmlock_path %{_dbpath}/__db.000 + + + To be continued... Martin Beaudoin May 2011 - \ No newline at end of file + From f3016e21c46944daa8d84c51acebfc25071b8426 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 16 May 2011 16:55:10 -0400 Subject: [PATCH 14/29] ThirdParty: switch to mpfr-3.0.1. Select a better URL for downloading this package. --- ThirdParty/AllMake.stage1 | 4 +- ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec | 2 +- ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec | 2 +- ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec | 158 ++++++++++++++++++++++ 6 files changed, 164 insertions(+), 6 deletions(-) create mode 100644 ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec diff --git a/ThirdParty/AllMake.stage1 b/ThirdParty/AllMake.stage1 index a87db0332..e3d81e87f 100755 --- a/ThirdParty/AllMake.stage1 +++ b/ThirdParty/AllMake.stage1 @@ -65,13 +65,13 @@ echo # You need gmp and mpfr for gcc-4.4.5 # Uncomment the following 3 lines for gcc-4.4.5 #( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) -#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz ) +#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz ) #( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz ) # # You need gmp, mpfr and mpc for gcc-4.5.1 # Uncomment the following 4 lines for gcc-4.5.1 #( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz ) -#( rpm_make -p mpfr-3.0.0 -s mpfr-3.0.0.spec -u http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz ) +#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz ) #( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz ) #( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz ) diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec index 31941e23c..f7efdea12 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec @@ -96,7 +96,7 @@ Group: Development/Tools [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" GMP_VERSION=gmp-5.0.1 - MPFR_VERSION=mpfr-3.0.0 + MPFR_VERSION=mpfr-3.0.1 # Set LD_LIBRARY_FILE for GMP and MPFR so configure won't fail some of the tests export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH diff --git a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec index 53760e18d..88dd5fabe 100644 --- a/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec +++ b/ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec @@ -96,7 +96,7 @@ Group: Development/Tools [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" GMP_VERSION=gmp-5.0.1 - MPFR_VERSION=mpfr-3.0.0 + MPFR_VERSION=mpfr-3.0.1 MPC_VERSION=mpc-0.8.2 mkdir ./objBuildDir diff --git a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec index 0d37623e7..de29d6fc4 100644 --- a/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec @@ -96,7 +96,7 @@ Group: Development/Tools [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" GMP_VERSION=gmp-5.0.1 - MPFR_VERSION=mpfr-3.0.0 + MPFR_VERSION=mpfr-3.0.1 ./configure \ --prefix=%{_installPrefix} \ diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec index 1d37063a4..a7e993b3d 100644 --- a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec @@ -73,7 +73,7 @@ License: Unkown Name: %{name} Version: %{version} Release: %{release} -URL: http://www.mpfr.org/mpfr-current +URL: ftp://ftp.gnu.org/gnu/mpfr Source: %url/%{name}-%{version}.tar.gz Prefix: %{_prefix} Group: Development/Tools diff --git a/ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec new file mode 100644 index 000000000..904d6f330 --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec @@ -0,0 +1,158 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for mpfr-3.0.1 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# Disable the generation of debuginfo packages +%define debug_package %{nil} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name mpfr +%define release %{_WM_OPTIONS} +%define version 3.0.1 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: mpfr +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: ftp://ftp.gnu.org/gnu/mpfr +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + + GMP_VERSION=gmp-5.0.1 + ./configure \ + --prefix=%{_installPrefix} \ + --with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + make install DESTDIR=$RPM_BUILD_ROOT + + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export MPFR_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +[ -d \$MPFR_DIR/lib ] && _foamAddLib \$MPFR_DIR/lib + +# Enable access to the package applications if present +[ -d \$MPFR_DIR/bin ] && _foamAddPath \$MPFR_DIR/bin +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv MPFR_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS + +if ( -e \$MPFR_DIR/lib ) then + _foamAddLib \$MPFR_DIR/lib +endif + +if ( -e \$MPFR_DIR/bin ) then + _foamAddPath \$MPFR_DIR/bin +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + From cecae8937ed2adcb131c2f15b7644fda52894d7a Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 16 May 2011 21:40:12 -0400 Subject: [PATCH 15/29] ThirdParty: switch to mpfr-3.0.1 --- etc/settings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/settings.sh b/etc/settings.sh index b9ecd655b..5ef5869a3 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -137,7 +137,7 @@ OpenFOAM) _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib ;; Gcc44) - _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.0/platforms/$WM_OPTIONS/etc/mpfr-3.0.0.sh + _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.sh _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh ;; From c828d84e650f5b9dae04f9f5c1d3ff430bd1748c Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 28 May 2011 10:04:55 -0400 Subject: [PATCH 16/29] ThirdParty: adjustments for csh --- etc/cshrc | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/etc/cshrc b/etc/cshrc index 3436f03ad..3259b7c0d 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -107,8 +107,8 @@ if ( ! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc -setenv WM_COMPILER Gcc +if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc +#setenv WM_COMPILER Gcc #setenv WM_COMPILER Icc setenv WM_COMPILER_ARCH @@ -207,6 +207,9 @@ case Linux: breaksw case Darwin: + # this makes certain things easier + setenv WM_ARCH_BASE darwin + switch (`uname -p`) case powerpc: setenv WM_ARCH darwinPpc @@ -240,21 +243,25 @@ case Darwin: setenv MACOSX_DEPLOYMENT_TARGET `sw_vers -productVersion` # Use Mac-Ports-Compiler instead of Apple-gcc-4.2 - switch ($WM_COMPILER) - case Gcc43: - setenv WM_CC 'gcc-mp-4.3' - setenv WM_CXX 'g++-mp-4.3' - breaksw; - case Gcc44: - setenv WM_CC 'gcc-mp-4.4' - setenv WM_CXX 'g++-mp-4.4' - breaksw; - case Gcc45: - setenv WM_CC 'gcc-mp-4.5' - setenv WM_CXX 'g++-mp-4.5' - breaksw; - endsw - setenv WM_COMPILER "" + if ( ! $?compilerInstall ) setenv compilerInstall System + if ( $compilerInstall == "System" ) then + switch ($WM_COMPILER) + case Gcc43: + setenv WM_CC 'gcc-mp-4.3' + setenv WM_CXX 'g++-mp-4.3' + breaksw; + case Gcc44: + setenv WM_CC 'gcc-mp-4.4' + setenv WM_CXX 'g++-mp-4.4' + breaksw; + case Gcc45: + setenv WM_CC 'gcc-mp-4.5' + setenv WM_CXX 'g++-mp-4.5' + breaksw; + endsw + #setenv WM_COMPILER "" + endif + breaksw case SunOS: From 9893a45acd71844df1a6377f726fce2af3cae8db Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 28 May 2011 10:07:46 -0400 Subject: [PATCH 17/29] ThirdParty: adjustments for csh --- etc/settings.csh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/etc/settings.csh b/etc/settings.csh index b74145e4d..bdb4de2b6 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -88,7 +88,10 @@ _foamAddLib $FOAM_USER_LIBBIN # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # compilerInstall = OpenFOAM | System #set compilerInstall=OpenFOAM -set compilerInstall=System +#set compilerInstall=System +if ( ! $?compilerInstall ) then + setenv compilerInstall System +endif switch ("$compilerInstall") case OpenFOAM: @@ -98,6 +101,11 @@ case OpenFOAM: _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib breaksw + case Gcc44: + _foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.csh + _foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.csh + _foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.csh + breaksw case Gcc43: setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib @@ -127,7 +135,7 @@ endsw switch ("$WM_COMPILER") -case Gcc: +case Gcc*: setenv WM_CC 'gcc' setenv WM_CXX 'g++' breaksw @@ -439,7 +447,7 @@ if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.8.1 _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.csh endif -if ( $WM_ARCH == "darwinIntel" ) then +if ( $WM_ARCH == "darwinIntel" || $WM_ARCH == "darwinIntel64" ) then setenv DYLD_LIBRARY_PATH ${LD_LIBRARY_PATH} endif From a470b0c6657c6ca6554ccf44dc30fb010c6e10c6 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 28 May 2011 10:09:00 -0400 Subject: [PATCH 18/29] ThirdParty: adjustments for various version of Gcc compiler --- etc/settings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/settings.sh b/etc/settings.sh index 5ef5869a3..c5f5c4b82 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -177,7 +177,7 @@ unset compilerBin compilerLib compilerInstall case "$WM_COMPILER" in -Gcc) +Gcc*) export WM_CC='gcc' export WM_CXX='g++' ;; From ac09bdf6705880efc0181a9a38b3b180623a810c Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 9 Jun 2011 17:04:01 -0400 Subject: [PATCH 19/29] ThirdParty packages: fix compilation of libccmio-2.6.1 on Mac OS X --- ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 index 63a121b5a..58065f482 100644 --- a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 +++ b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 @@ -37,7 +37,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config. i386-apple-darwin8.11.1) echo i386-apple-darwin8 ;; -+ i386-apple-darwin10.5.0) ++ i386-apple-darwin10.5.0 | i386-apple-darwin10.7.0) + echo i386-apple-darwin10 ;; + *) From dbbaacc5eda938a275f68e3bc946218502a05422 Mon Sep 17 00:00:00 2001 From: beaudoin Date: Sat, 18 Jun 2011 08:40:36 -0400 Subject: [PATCH 20/29] ThirdParty packages: changing metis-5.0pre2 download URL --- ThirdParty/AllMake.stage3 | 2 +- ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 index 7f6555cbc..4e8eaa8d0 100755 --- a/ThirdParty/AllMake.stage3 +++ b/ThirdParty/AllMake.stage3 @@ -59,7 +59,7 @@ echo # Metis if [ -z "$METIS_SYSTEM" ] then - ( rpm_make -p metis-5.0pre2 -s metis-5.0pre2.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz ) + ( rpm_make -p metis-5.0pre2 -s metis-5.0pre2.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-5.0pre2.tar.gz ) else echo "Using system installed Metis" echo "" diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec index 67e2d33c1..50a081fca 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec @@ -73,7 +73,7 @@ License: Unkown Name: %{name} Version: %{version} Release: %{release} -URL: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis +URL: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD Source: %url/%{name}-%{version}.tar.gz Prefix: %{_prefix} Group: Development/Tools From 01127a76e35bc7261431ae310b814fe0b425493e Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 11 Jul 2011 09:06:09 -0400 Subject: [PATCH 21/29] ThirdParty packages: libccmio-2.6.1: fix for Mac OSX 10.6.8. Contributed by Darrin Stephens --- ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 index 58065f482..1a1285b1a 100644 --- a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 +++ b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 @@ -37,7 +37,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config. i386-apple-darwin8.11.1) echo i386-apple-darwin8 ;; -+ i386-apple-darwin10.5.0 | i386-apple-darwin10.7.0) ++ i386-apple-darwin10.5.0 | i386-apple-darwin10.7.0 | i386-apple-darwin10.8.0) + echo i386-apple-darwin10 ;; + *) From cb8972be198f4dd2d0b19989ecb2e20087b6d7d1 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 11 Jul 2011 09:13:13 -0400 Subject: [PATCH 22/29] ThirdParty packages: Add comment in README file. Contributed by Darrin Stephens --- ThirdParty/README.ThirdParty | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ThirdParty/README.ThirdParty b/ThirdParty/README.ThirdParty index f8ab4ba64..4305ee83b 100644 --- a/ThirdParty/README.ThirdParty +++ b/ThirdParty/README.ThirdParty @@ -108,8 +108,11 @@ Relocating the RPM root installation directory: 10: Gotchas and solutions: - Error messages from rpm: - ------------------------ + 1: It was reported that version 5.2.0 of rpm does not work well with the provided scripts. + rpm version 5.2.1 works nicely. + + 2: Error messages from rpm: + --------------------------- Problem : error: can't create transaction lock on /var/lock/rpm/transaction Solution: add the following entry in your file ~/.rpmmacros From 67f8b4e56b6aec9046bfc7ebb38d7d26ba007ba5 Mon Sep 17 00:00:00 2001 From: beaudoin Date: Thu, 14 Jul 2011 20:15:00 -0400 Subject: [PATCH 23/29] ThirdParty packages: changing ParMetis-3.1.1 download URL --- ThirdParty/AllMake.stage3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 index 4e8eaa8d0..778373225 100755 --- a/ThirdParty/AllMake.stage3 +++ b/ThirdParty/AllMake.stage3 @@ -110,7 +110,7 @@ fi # ParMetis if [ -z "$PARMETIS_SYSTEM" ] then - ( rpm_make -p ParMetis-3.1.1 -s ParMetis-3.1.1.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz ) + ( rpm_make -p ParMetis-3.1.1 -s ParMetis-3.1.1.spec -u http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD/ParMetis-3.1.1.tar.gz ) else echo "Using system installed ParMetis" echo "" From 6f947e5eedbc043afb48052c4c18e18c28bb5092 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 9 Aug 2011 20:06:47 +0100 Subject: [PATCH 24/29] Precise cp in run script --- tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun index 546ae792b..6beda2d3c 100755 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun @@ -102,7 +102,7 @@ makeMeshByCellSet() runApplicationAndReportOnError blockMesh makeMeshByCellSet 1 2 runApplicationAndReportOnError subsetMesh -overwrite c0 -patch floatingObject -cp -r 0.org 0 > /dev/null 2>&1 +cp -r 0.org/* 0 > /dev/null 2>&1 runApplicationAndReportOnError setFields runApplicationAndReportOnError $application From f3533582f80fe8a45735bba8fcb16d7ac581a47a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 9 Aug 2011 20:17:23 +0100 Subject: [PATCH 25/29] Sync mesh after adding zones --- src/dynamicMesh/dynamicFvMesh/mixerGgiFvMesh/mixerGgiFvMesh.C | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dynamicMesh/dynamicFvMesh/mixerGgiFvMesh/mixerGgiFvMesh.C b/src/dynamicMesh/dynamicFvMesh/mixerGgiFvMesh/mixerGgiFvMesh.C index 3aa6d0dd2..9c1a37e50 100644 --- a/src/dynamicMesh/dynamicFvMesh/mixerGgiFvMesh/mixerGgiFvMesh.C +++ b/src/dynamicMesh/dynamicFvMesh/mixerGgiFvMesh/mixerGgiFvMesh.C @@ -111,6 +111,7 @@ void Foam::mixerGgiFvMesh::addZonesAndModifiers() addZones(pz, fz, cz); // Write mesh + syncUpdateMesh(); write(); } From 653fc3a35c1a3ec7cb211d179b624c084a96a382 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Tue, 16 Aug 2011 21:07:35 -0400 Subject: [PATCH 26/29] ThirdParty scripts: Qt: disable generation of .debug files --- .../rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec index 1723a2bb1..3ac237fac 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.0.spec @@ -102,6 +102,7 @@ Group: Development/Tools -opensource --confirm-license=yes \ -release -shared \ -nomake examples -nomake demos \ + -no-separate-debug-info \ --prefix=%{_installPrefix} # Explicitely specify LD_LIBRARY_PATH so it can find QT own libraries From 95e65ecfa50fe19df9b1984dfae21d22c46f5a5a Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Wed, 17 Aug 2011 19:30:10 -0700 Subject: [PATCH 27/29] ThirdParty packages: switch to cmake 2.8.5 --- ThirdParty/AllMake.stage1 | 2 +- etc/settings.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ThirdParty/AllMake.stage1 b/ThirdParty/AllMake.stage1 index e3d81e87f..224b6c436 100755 --- a/ThirdParty/AllMake.stage1 +++ b/ThirdParty/AllMake.stage1 @@ -89,7 +89,7 @@ echo #( rpm_make -p flex-2.5.35 -s flex-2.5.35.spec -u http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz ) # cmake -( rpm_make -p cmake-2.8.3 -s cmake-2.8.3.spec -u http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz ) +( rpm_make -p cmake-2.8.5 -s cmake-2.8.5.spec -u http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz ) echo ======================================== echo Done ThirdParty AllMake: Stage1 diff --git a/etc/settings.sh b/etc/settings.sh index c5f5c4b82..4ee1d8a4b 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -480,8 +480,8 @@ export MPI_BUFFER_SIZE # Load cmake # ~~~~~~~~~~ -[ -z "$CMAKE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3 ] && { - _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS/etc/cmake-2.8.3.sh +[ -z "$CMAKE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5 ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5/platforms/$WM_OPTIONS/etc/cmake-2.8.5.sh } [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR" From b8b33b691e3520160bd86d9a85b47bc2cdce22a0 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Tue, 16 Aug 2011 20:42:40 -0700 Subject: [PATCH 28/29] ThirdParty packages: switch to cmake 2.8.5 --- etc/settings.csh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/settings.csh b/etc/settings.csh index bdb4de2b6..5ad7aeb5c 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -425,8 +425,8 @@ endif # cmake # ~~~~~ -if ( $?CMAKE_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.3 ) then - _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS/etc/cmake-2.8.3.csh +if ( $?CMAKE_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.5 ) then + _foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5/platforms/$WM_OPTIONS/etc/cmake-2.8.5.csh endif # Python From e796a4a1c205979654f2d41842d26d1759710221 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Thu, 18 Aug 2011 17:01:57 -0400 Subject: [PATCH 29/29] ThirdParty packages: switch to cmake 2.8.5 --- ThirdParty/rpmBuild/SPECS/cmake-2.8.5.spec | 151 +++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 ThirdParty/rpmBuild/SPECS/cmake-2.8.5.spec diff --git a/ThirdParty/rpmBuild/SPECS/cmake-2.8.5.spec b/ThirdParty/rpmBuild/SPECS/cmake-2.8.5.spec new file mode 100644 index 000000000..ba38555f4 --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/cmake-2.8.5.spec @@ -0,0 +1,151 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright held by original author +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# RPM spec file for cmake-2.8.5 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2010) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# Disable the generation of debuginfo packages +%define debug_package %{nil} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in thi file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name cmake +%define release %{_WM_OPTIONS} +%define version 2.8.5 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +BuildRoot: %{buildroot} +Summary: cmake +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://www.cmake.org/files/v2.8/ +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + + ./configure \ + --prefix=%{_installPrefix} + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + make install DESTDIR=$RPM_BUILD_ROOT + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export CMAKE_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +export CMAKE_BIN_DIR=\$CMAKE_DIR/bin + +# Enable access to the runtime package applications +[ -d \$CMAKE_BIN_DIR ] && _foamAddPath \$CMAKE_BIN_DIR +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv CMAKE_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +setenv CMAKE_BIN_DIR \$CMAKE_DIR/bin + +if ( -e \$CMAKE_BIN_DIR ) then + _foamAddPath \$CMAKE_BIN_DIR +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} +