ThirdParty: Adding bison, flex and m4
This commit is contained in:
parent
4a271dbf06
commit
1d2f5551ac
25 changed files with 705 additions and 110 deletions
2
ThirdParty/AllMake.stage0
vendored
2
ThirdParty/AllMake.stage0
vendored
|
@ -34,6 +34,8 @@
|
||||||
# to the appropriate location for your architcture so the other stage scripts
|
# to the appropriate location for your architcture so the other stage scripts
|
||||||
# will be able to pick them up
|
# will be able to pick them up
|
||||||
#
|
#
|
||||||
|
# Usage: ./AllMake.stage0 file_1.rpm file_2.rpm ... file_n.rpm
|
||||||
|
#
|
||||||
# Author:
|
# Author:
|
||||||
# Martin Beaudoin, Hydro-Quebec, (2010)
|
# Martin Beaudoin, Hydro-Quebec, (2010)
|
||||||
#
|
#
|
||||||
|
|
31
ThirdParty/AllMake.stage1
vendored
31
ThirdParty/AllMake.stage1
vendored
|
@ -61,18 +61,35 @@ echo ========================================
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Gcc and companion libraries
|
# 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 )
|
# You need gmp and mpfr for gcc-4.4.5
|
||||||
#( rpm_make gcc-4.5.1 ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz )
|
# 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
|
# 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
|
# 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 ========================================
|
||||||
echo Done ThirdParty AllMake: Stage1
|
echo Done ThirdParty AllMake: Stage1
|
||||||
|
|
6
ThirdParty/AllMake.stage2
vendored
6
ThirdParty/AllMake.stage2
vendored
|
@ -65,9 +65,9 @@ echo
|
||||||
if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ]
|
if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ]
|
||||||
then
|
then
|
||||||
# MPI
|
# 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 -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 openmpi-1.4.3 http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.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 openmpi-1.5 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
|
else
|
||||||
echo "Using system installed OpenMPI"
|
echo "Using system installed OpenMPI"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
23
ThirdParty/AllMake.stage3
vendored
23
ThirdParty/AllMake.stage3
vendored
|
@ -59,7 +59,7 @@ echo
|
||||||
# Metis
|
# Metis
|
||||||
if [ -z "$METIS_SYSTEM" ]
|
if [ -z "$METIS_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed Metis"
|
echo "Using system installed Metis"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -68,7 +68,7 @@ fi
|
||||||
# ParMGridGen
|
# ParMGridGen
|
||||||
if [ -z "$PARMGRIDGEN_SYSTEM" ]
|
if [ -z "$PARMGRIDGEN_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed ParMGridGen"
|
echo "Using system installed ParMGridGen"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -77,7 +77,7 @@ fi
|
||||||
# Libccmio
|
# Libccmio
|
||||||
if [ -z "$LIBCCMIO_SYSTEM" ]
|
if [ -z "$LIBCCMIO_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed Libccmio"
|
echo "Using system installed Libccmio"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -86,13 +86,13 @@ fi
|
||||||
# Mesquite
|
# Mesquite
|
||||||
if [ -z "$MESQUITE_SYSTEM" ]
|
if [ -z "$MESQUITE_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed Mesquite"
|
echo "Using system installed Mesquite"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
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 macro rpm_make() will make sure to update the ThirdParty environment variables before starting
|
||||||
# the compilation.
|
# the compilation.
|
||||||
# Just make sure the OpenMPI environment variables are properly initialized, or that
|
# Just make sure the OpenMPI environment variables are properly initialized, or that
|
||||||
|
@ -101,7 +101,7 @@ fi
|
||||||
# Scotch
|
# Scotch
|
||||||
if [ -z "$SCOTCH_SYSTEM" ]
|
if [ -z "$SCOTCH_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed Scotch"
|
echo "Using system installed Scotch"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -110,12 +110,21 @@ fi
|
||||||
# ParMetis
|
# ParMetis
|
||||||
if [ -z "$PARMETIS_SYSTEM" ]
|
if [ -z "$PARMETIS_SYSTEM" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed ParMetis"
|
echo "Using system installed ParMetis"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
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 ========================================
|
||||||
echo Done ThirdParty AllMake: Stage3
|
echo Done ThirdParty AllMake: Stage3
|
||||||
echo ========================================
|
echo ========================================
|
||||||
|
|
7
ThirdParty/AllMake.stage4
vendored
7
ThirdParty/AllMake.stage4
vendored
|
@ -59,7 +59,7 @@ echo
|
||||||
# qt-everywhere-opensource-src-4.7.0
|
# qt-everywhere-opensource-src-4.7.0
|
||||||
if [ ! -z "$QT_THIRD_PARTY" ]
|
if [ ! -z "$QT_THIRD_PARTY" ]
|
||||||
then
|
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
|
else
|
||||||
echo "Using system installed QT"
|
echo "Using system installed QT"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -69,9 +69,12 @@ fi
|
||||||
# Paraview
|
# Paraview
|
||||||
if [ -z "$PARAVIEW_SYSTEM" ]
|
if [ -z "$PARAVIEW_SYSTEM" ]
|
||||||
then
|
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 ]
|
if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
|
||||||
then
|
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'
|
-D '_qmakePath $QT_BIN_DIR/qmake'
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|
|
@ -166,7 +166,7 @@ Patch0: ParaView-3.8.1.patch_darwin
|
||||||
cd ./buildObj
|
cd ./buildObj
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$RPM_BUILD_ROOT%{_installPrefix} \
|
-DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
..
|
..
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ Patch0: ParaView-3.8.1.patch_darwin
|
||||||
export NO_BRP_STALE_LINK_ERROR=yes
|
export NO_BRP_STALE_LINK_ERROR=yes
|
||||||
|
|
||||||
cd buildObj
|
cd buildObj
|
||||||
make install
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
2
ThirdParty/rpmBuild/SPECS/Python-2.7.spec
vendored
2
ThirdParty/rpmBuild/SPECS/Python-2.7.spec
vendored
|
@ -99,7 +99,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
153
ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec
vendored
Normal file
153
ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec
vendored
Normal file
|
@ -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}
|
||||||
|
|
4
ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec
vendored
4
ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec
vendored
|
@ -93,13 +93,13 @@ Group: Development/Tools
|
||||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$RPM_BUILD_ROOT/%{_installPrefix}
|
--prefix=%{_installPrefix}
|
||||||
|
|
||||||
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
153
ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec
vendored
Normal file
153
ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec
vendored
Normal file
|
@ -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}
|
||||||
|
|
41
ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec
vendored
41
ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec
vendored
|
@ -95,6 +95,10 @@ Group: Development/Tools
|
||||||
GMP_VERSION=gmp-5.0.1
|
GMP_VERSION=gmp-5.0.1
|
||||||
MPFR_VERSION=mpfr-3.0.0
|
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
|
mkdir ./objBuildDir
|
||||||
cd ./objBuildDir
|
cd ./objBuildDir
|
||||||
|
|
||||||
|
@ -111,7 +115,7 @@ Group: Development/Tools
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd ./objBuildDir
|
cd ./objBuildDir
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# 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
|
# 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
|
# 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
|
DOT_SH_EOF
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -140,28 +145,30 @@ DOT_SH_EOF
|
||||||
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
# Load %{name}-%{version} libraries and binaries if available
|
# 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
|
if ( -e \$WM_COMPILER_DIR/lib ) then
|
||||||
_foamAddLib \$GCC_DIR/lib
|
_foamAddLib \$WM_COMPILER_DIR/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ( -e \$GCC_DIR/bin ) then
|
if ( -e \$WM_COMPILER_DIR/lib64 ) then
|
||||||
_foamAddPath \$GCC_DIR/bin
|
_foamAddLib \$WM_COMPILER_DIR/lib64
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$WM_COMPILER_DIR/bin ) then
|
||||||
|
_foamAddPath \$WM_COMPILER_DIR/bin
|
||||||
endif
|
endif
|
||||||
DOT_CSH_EOF
|
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
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_installPrefix}/bin
|
%{_installPrefix}
|
||||||
%{_installPrefix}/etc
|
|
||||||
%{_installPrefix}/include
|
|
||||||
%{_installPrefix}/info
|
|
||||||
%{_installPrefix}/lib
|
|
||||||
%{_installPrefix}/libexec
|
|
||||||
%{_installPrefix}/man
|
|
||||||
%{_installPrefix}/share
|
|
||||||
|
|
||||||
|
|
2
ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec
vendored
2
ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec
vendored
|
@ -113,7 +113,7 @@ Group: Development/Tools
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd ./objBuildDir
|
cd ./objBuildDir
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
7
ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec
vendored
7
ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec
vendored
|
@ -97,7 +97,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
@ -137,6 +137,11 @@ if ( -e \$GMP_DIR/bin ) then
|
||||||
endif
|
endif
|
||||||
DOT_CSH_EOF
|
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
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
153
ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec
vendored
Normal file
153
ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec
vendored
Normal file
|
@ -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}
|
||||||
|
|
|
@ -111,7 +111,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
2
ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec
vendored
2
ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec
vendored
|
@ -104,7 +104,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
9
ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec
vendored
9
ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec
vendored
|
@ -100,7 +100,8 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOTbg
|
||||||
|
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
@ -140,6 +141,12 @@ if ( -e \$MPFR_DIR/bin ) then
|
||||||
endif
|
endif
|
||||||
DOT_CSH_EOF
|
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
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
9
ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec
vendored
9
ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec
vendored
|
@ -97,6 +97,9 @@ Group: Development/Tools
|
||||||
if [ -n "$SGE_ROOT" ]
|
if [ -n "$SGE_ROOT" ]
|
||||||
then
|
then
|
||||||
mpiWith="$mpiWith --with-sge"
|
mpiWith="$mpiWith --with-sge"
|
||||||
|
else
|
||||||
|
mpiWith="$mpiWith --without-sge"
|
||||||
|
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Infiniband support
|
# Infiniband support
|
||||||
|
@ -107,7 +110,8 @@ Group: Development/Tools
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
|
--prefix=%{_installPrefix} \
|
||||||
|
--exec_prefix=%{_installPrefix} \
|
||||||
--disable-mpirun-prefix-by-default \
|
--disable-mpirun-prefix-by-default \
|
||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
|
@ -115,6 +119,7 @@ Group: Development/Tools
|
||||||
--disable-mpi-f90 \
|
--disable-mpi-f90 \
|
||||||
--disable-mpi-cxx \
|
--disable-mpi-cxx \
|
||||||
--disable-mpi-profile \
|
--disable-mpi-profile \
|
||||||
|
--without-slurm \
|
||||||
$mpiWith \
|
$mpiWith \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -122,7 +127,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
39
ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec
vendored
39
ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec
vendored
|
@ -84,6 +84,7 @@ Group: Development/Tools
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# export WM settings in a form that GNU configure recognizes
|
# export WM settings in a form that GNU configure recognizes
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
@ -93,36 +94,42 @@ Group: Development/Tools
|
||||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
unset mpiWith
|
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" ]
|
if [ -n "$SGE_ROOT" ]
|
||||||
then
|
then
|
||||||
mpiWith="$mpiWith --with-sge"
|
mpiWith="$mpiWith --with-sge"
|
||||||
|
else
|
||||||
|
mpiWith="$mpiWith --without-sge"
|
||||||
|
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Infiniband support
|
# Infiniband support
|
||||||
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
|
# Adjust according to your local paths
|
||||||
# then
|
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
|
||||||
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
|
# then
|
||||||
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
|
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
|
||||||
# fi
|
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
|
||||||
|
# fi
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
|
--prefix=%{_installPrefix} \
|
||||||
|
--exec_prefix=%{_installPrefix} \
|
||||||
--disable-mpirun-prefix-by-default \
|
--disable-mpirun-prefix-by-default \
|
||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
--disable-mpi-f77 \
|
--disable-mpi-f77 \
|
||||||
--disable-mpi-f90 \
|
--disable-mpi-f90 \
|
||||||
--disable-mpi-cxx \
|
--disable-mpi-cxx \
|
||||||
--disable-mpi-profile \
|
--without-slurm \
|
||||||
$mpiWith \
|
--disable-mpi-profile $mpiWith
|
||||||
;
|
|
||||||
|
|
||||||
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# 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
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
# Load %{name}-%{version} libraries and binaries
|
# 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_BIN_DIR=\$OPENMPI_DIR/bin
|
||||||
export OPENMPI_LIB_DIR=\$OPENMPI_DIR/lib
|
export OPENMPI_LIB_DIR=\$OPENMPI_DIR/lib
|
||||||
|
|
||||||
|
@ -160,7 +167,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS
|
||||||
|
|
||||||
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
|
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
|
||||||
then
|
then
|
||||||
echo "Using system installed OpenMPI:"
|
echo " Environment variables defined for OpenMPI:"
|
||||||
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
|
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
|
||||||
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
||||||
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
||||||
|
@ -209,7 +216,7 @@ setenv PLIBS "\$OPENMPI_LINK_FLAGS"
|
||||||
|
|
||||||
|
|
||||||
if (\$?FOAM_VERBOSE && \$?prompt) then
|
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_BIN_DIR : \$OPENMPI_BIN_DIR"
|
||||||
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
||||||
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
||||||
|
@ -229,4 +236,4 @@ rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_installPrefix}/*
|
%{_installPrefix}
|
||||||
|
|
13
ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec
vendored
13
ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec
vendored
|
@ -97,6 +97,9 @@ Group: Development/Tools
|
||||||
if [ -n "$SGE_ROOT" ]
|
if [ -n "$SGE_ROOT" ]
|
||||||
then
|
then
|
||||||
mpiWith="$mpiWith --with-sge"
|
mpiWith="$mpiWith --with-sge"
|
||||||
|
else
|
||||||
|
mpiWith="$mpiWith --without-sge"
|
||||||
|
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Infiniband support
|
# Infiniband support
|
||||||
|
@ -107,13 +110,15 @@ Group: Development/Tools
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$RPM_BUILD_ROOT%{_installPrefix} \
|
--prefix=%{_installPrefix} \
|
||||||
|
--exec_prefix=%{_installPrefix} \
|
||||||
--disable-mpirun-prefix-by-default \
|
--disable-mpirun-prefix-by-default \
|
||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
--disable-mpi-f77 \
|
--disable-mpi-f77 \
|
||||||
--disable-mpi-f90 \
|
--disable-mpi-f90 \
|
||||||
--disable-mpi-cxx \
|
--disable-mpi-cxx \
|
||||||
|
--without-slurm \
|
||||||
--disable-mpi-profile \
|
--disable-mpi-profile \
|
||||||
$mpiWith \
|
$mpiWith \
|
||||||
;
|
;
|
||||||
|
@ -122,7 +127,7 @@ Group: Development/Tools
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
@ -160,7 +165,7 @@ export PLIBS=\$OPENMPI_LINK_FLAGS
|
||||||
|
|
||||||
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
|
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
|
||||||
then
|
then
|
||||||
echo "Using system installed OpenMPI:"
|
echo " Environment variables defined for OpenMPI:"
|
||||||
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
|
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
|
||||||
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
||||||
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
||||||
|
@ -209,7 +214,7 @@ setenv PLIBS \`echo \$OPENMPI_LINK_FLAGS\`
|
||||||
|
|
||||||
|
|
||||||
if (\$?FOAM_VERBOSE && \$?prompt) then
|
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_BIN_DIR : \$OPENMPI_BIN_DIR"
|
||||||
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
|
||||||
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
|
||||||
|
|
|
@ -97,14 +97,18 @@ Group: Development/Tools
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
-opensource --confirm-license=yes \
|
-opensource --confirm-license=yes \
|
||||||
|
-release -shared \
|
||||||
|
-nomake examples -nomake demos \
|
||||||
--prefix=%{_installPrefix}
|
--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
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
make -j $WM_NCOMPPROCS
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# make install INSTALL_ROOT=$RPM_BUILD_ROOT%{_installPrefix}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
make install INSTALL_ROOT=$RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
# Creation of OpenFOAM specific .csh and .sh files"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
@ -145,15 +149,6 @@ rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_installPrefix}/bin
|
%{_installPrefix}
|
||||||
%{_installPrefix}/etc
|
|
||||||
%{_installPrefix}/lib
|
|
||||||
%{_installPrefix}/imports
|
|
||||||
%{_installPrefix}/include
|
|
||||||
%{_installPrefix}/mkspecs
|
|
||||||
%{_installPrefix}/plugins
|
|
||||||
%{_installPrefix}/phrasebooks
|
|
||||||
%{_installPrefix}/q3porting.xml
|
|
||||||
%{_installPrefix}/translations
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ Patch0: scotch-5.1.10b_patch_0
|
||||||
%install
|
%install
|
||||||
cd src
|
cd src
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_installPrefix}
|
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"
|
# Creation of OpenFOAM specific .csh and .sh files"
|
||||||
|
|
||||||
|
|
76
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
76
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
|
@ -49,13 +49,39 @@ echo ""
|
||||||
#
|
#
|
||||||
rpm_make()
|
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
|
# 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
|
. $WM_PROJECT_DIR/etc/settings.sh
|
||||||
|
|
||||||
rpmName=$package-$WM_OPTIONS.$architecture
|
rpmName=$_PACKAGE-$WM_OPTIONS.$architecture
|
||||||
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
||||||
|
|
||||||
# We check immediatly if the RPM binary package is available in the local RPMs vault.
|
# We check immediatly if the RPM binary package is available in the local RPMs vault.
|
||||||
|
@ -76,35 +102,35 @@ rpm_make()
|
||||||
# are for the command rpmbuild.
|
# are for the command rpmbuild.
|
||||||
# This is a bit fragile, improvements will come later if necessary.
|
# This is a bit fragile, improvements will come later if necessary.
|
||||||
#
|
#
|
||||||
[ "$#" -ge 2 ] && {
|
# Do we need to download the package using the supplied URL
|
||||||
packageURL="$2"
|
if [ -n "$_PACKAGE_URL" ]; then
|
||||||
packageTarBall=`basename $packageURL`
|
packageTarBall=`basename $_PACKAGE_URL`
|
||||||
|
|
||||||
if [ ! -e "SOURCES/$packageTarBall" ]; then
|
if [ ! -e "SOURCES/$packageTarBall" ]; then
|
||||||
echo "Download $packageTarBall from : $packageURL"
|
echo "Download $packageTarBall from : $_PACKAGE_URL"
|
||||||
( cd SOURCES; wget --no-check-certificate $packageURL )
|
( cd SOURCES; wget --no-check-certificate $_PACKAGE_URL )
|
||||||
fi
|
fi
|
||||||
}
|
fi
|
||||||
|
|
||||||
[ "$#" -gt 2 ] && {
|
echo "Making package $_PACKAGE using RPM."
|
||||||
# We will pass the rest of the command-line arguments to rpmbuild
|
rpm_build $_PACKAGE $_SPECFILE $_ADDITIONALFLAGS "$@"
|
||||||
shift 2
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Making package $package using RPM."
|
|
||||||
rpm_build $package "$@"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install RPM package if not done already
|
# Install RPM package if not done already
|
||||||
if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$package/platforms/$WM_OPTIONS" ]; then
|
if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$_PACKAGE/platforms/$WM_OPTIONS" ]; then
|
||||||
echo "Installing package: $package"
|
echo "Installing package: $_PACKAGE"
|
||||||
rpm_uninstall $package
|
rpm_uninstall $_PACKAGE
|
||||||
rpm_install $package
|
rpm_install $_PACKAGE
|
||||||
else
|
else
|
||||||
echo "Package $package is already installed"
|
echo "Package $_PACKAGE is already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Done installing package $package"
|
unset _PACKAGE
|
||||||
|
unset _SPECFILE
|
||||||
|
unset _PACKAGE_URL
|
||||||
|
unset _ADDITIONALFLAGS
|
||||||
|
|
||||||
|
echo "Done installing package $_PACKAGE"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,8 +140,8 @@ rpm_make()
|
||||||
rpm_build()
|
rpm_build()
|
||||||
{
|
{
|
||||||
package="$1"
|
package="$1"
|
||||||
shift
|
specFile="$2"
|
||||||
specFile="$package.spec"
|
shift 2
|
||||||
|
|
||||||
cd $buildBase
|
cd $buildBase
|
||||||
|
|
||||||
|
@ -125,7 +151,7 @@ rpm_build()
|
||||||
}
|
}
|
||||||
|
|
||||||
#Build RPM package
|
#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 "$@"
|
#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
|
# Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations
|
||||||
|
|
|
@ -40,7 +40,7 @@ export FOAM_VERBOSE=1
|
||||||
|
|
||||||
# Specify system compiler
|
# Specify system compiler
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
compilerInstall=system
|
compilerInstall=System
|
||||||
|
|
||||||
# Specify system openmpi
|
# Specify system openmpi
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -142,6 +142,15 @@ compilerInstall=system
|
||||||
#export PARAVIEW_DIR=path_to_system_installed_paraview
|
#export PARAVIEW_DIR=path_to_system_installed_paraview
|
||||||
#export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin
|
#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
|
# Specify ParaView version
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#export ParaView_VERSION=git # eg, cvs/git version
|
#export ParaView_VERSION=git # eg, cvs/git version
|
||||||
|
|
|
@ -120,8 +120,13 @@ unset compilerBin compilerLib
|
||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | System
|
# 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=OpenFOAM
|
||||||
compilerInstall=System
|
#compilerInstall=System
|
||||||
|
|
||||||
case "${compilerInstall:-OpenFOAM}" in
|
case "${compilerInstall:-OpenFOAM}" in
|
||||||
OpenFOAM)
|
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/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
|
_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)
|
Gcc43)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
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
|
_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" ]
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||||
then
|
then
|
||||||
echo "Using system installed OpenMPI:"
|
echo " Environment variables defined for OpenMPI:"
|
||||||
echo " OPENMPI_BIN_DIR : $OPENMPI_BIN_DIR"
|
echo " OPENMPI_BIN_DIR : $OPENMPI_BIN_DIR"
|
||||||
echo " OPENMPI_LIB_DIR : $OPENMPI_LIB_DIR"
|
echo " OPENMPI_LIB_DIR : $OPENMPI_LIB_DIR"
|
||||||
echo " OPENMPI_INCLUDE_DIR : $OPENMPI_INCLUDE_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"
|
[ "$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
|
# Load Python
|
||||||
# ~~~~~~~~~~~
|
# ~~~~~~~~~~~
|
||||||
|
|
Reference in a new issue