Partial master merge
This commit is contained in:
parent
90b957a97a
commit
e4e4a5f967
32 changed files with 1428 additions and 137 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
|
||||
# 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)
|
||||
#
|
||||
|
|
31
ThirdParty/AllMake.stage1
vendored
31
ThirdParty/AllMake.stage1
vendored
|
@ -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.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.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 )
|
||||
|
||||
# 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
|
||||
|
|
6
ThirdParty/AllMake.stage2
vendored
6
ThirdParty/AllMake.stage2
vendored
|
@ -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 ""
|
||||
|
|
23
ThirdParty/AllMake.stage3
vendored
23
ThirdParty/AllMake.stage3
vendored
|
@ -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/OLD/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/OLD/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 ========================================
|
||||
|
|
12
ThirdParty/AllMake.stage4
vendored
12
ThirdParty/AllMake.stage4
vendored
|
@ -59,24 +59,26 @@ 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 ""
|
||||
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 \
|
||||
-D '_qmakePath $QT_BIN_DIR/qmake'
|
||||
( rpm_make -p ParaView-3.10.1 -s ParaView-3.10.1.spec -u http://www.paraview.org/files/v3.10/ParaView-3.10.1.tar.gz \
|
||||
-a --define='_qmakePath $QT_BIN_DIR/qmake'
|
||||
)
|
||||
else
|
||||
echo "WARNING: "
|
||||
echo "WARNING: Skipping the installation of ParaView-3.8.1."
|
||||
echo "WARNING: Skipping the installation of ParaView-3.10.1."
|
||||
echo "WARNING: Please make sure the QT_BIN_DIR environment variable properly"
|
||||
echo "WARNING: initialized in the file prefs.sh or prefs.csh"
|
||||
echo "WARNING: The command \$QT_BIN_DIR/qmake needs to be valid"
|
||||
|
|
38
ThirdParty/README.ThirdParty
vendored
38
ThirdParty/README.ThirdParty
vendored
|
@ -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,21 @@ 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.
|
||||
|
||||
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:
|
||||
|
@ -72,11 +81,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
|
||||
|
||||
|
@ -95,9 +105,25 @@ 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:
|
||||
|
||||
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
|
||||
|
||||
%_rpmlock_path %{_dbpath}/__db.000
|
||||
|
||||
|
||||
|
||||
To be continued...
|
||||
|
||||
|
||||
Martin Beaudoin
|
||||
Novembre 2010
|
||||
May 2011
|
||||
|
|
@ -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 | i386-apple-darwin10.8.0)
|
||||
+ echo i386-apple-darwin10 ;;
|
||||
+
|
||||
*)
|
||||
|
|
|
@ -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
|
||||
|
@ -150,6 +153,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -157,6 +160,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
280
ThirdParty/rpmBuild/SPECS/ParaView-3.10.1.spec
vendored
Normal file
280
ThirdParty/rpmBuild/SPECS/ParaView-3.10.1.spec
vendored
Normal file
|
@ -0,0 +1,280 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / 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 ParaView-3.10.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 ParaView
|
||||
%define release %{_WM_OPTIONS}
|
||||
%define version 3.10.1
|
||||
|
||||
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||
|
||||
BuildRoot: %{buildroot}
|
||||
Summary: ParaView
|
||||
License: Unkown
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
URL: http://www.paraview.org/files/v3.10/
|
||||
Source: %url/%{name}-%{version}.tar.gz
|
||||
Prefix: %{_prefix}
|
||||
Group: Development/Tools
|
||||
Patch0: ParaView-3.10.1.patch_darwin
|
||||
|
||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Here, we define default compiling options for cmake
|
||||
#
|
||||
# One can override the option on the commande line : --define='MACRO EXPR'
|
||||
#
|
||||
%{!?_withVerbose: %define _withVerbose false}
|
||||
%{!?_withMesa: %define _withMesa false}
|
||||
%{!?_withMPI: %define _withMPI true}
|
||||
%{!?_withPython: %define _withPython true}
|
||||
%{!?_withQt: %define _withQt true}
|
||||
%{!?_qmakePath: %define _qmakePath Undefined}
|
||||
%{!?_mesaIncludePath: %define _mesaIncludePath Undefined}
|
||||
%{!?_mesaLibPath: %define _mesaLibPath Undefined}
|
||||
%{!?_pythonLibPath: %define _pythonLibPath Undefined}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%ifos darwin
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
#
|
||||
# set CMake cache variables
|
||||
#
|
||||
addCMakeVariable()
|
||||
{
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
# 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"
|
||||
|
||||
set +x
|
||||
echo ""
|
||||
echo "Compilation options:"
|
||||
echo " _withVerbose : %{_withVerbose}"
|
||||
echo " _withMesa : %{_withMesa}"
|
||||
echo " _withMPI : %{_withMPI}"
|
||||
echo " _withPython : %{_withPython}"
|
||||
echo " _withQt : %{_withQt}"
|
||||
echo " _qmakePath : %{_qmakePath}"
|
||||
echo " _mesaIncludePath : %{_mesaIncludePath}"
|
||||
echo " _mesaLibPath : %{_mesaLibPath}"
|
||||
echo " _pythonLibPath : %{_pythonLibPath}"
|
||||
echo ""
|
||||
set -x
|
||||
|
||||
# start with these general settings
|
||||
addCMakeVariable VTK_USE_TK:BOOL=OFF
|
||||
addCMakeVariable BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF
|
||||
addCMakeVariable CMAKE_BUILD_TYPE:STRING=Release
|
||||
|
||||
# HJ, 9/Aug/2011
|
||||
addCMakeVariable OPENGL_gl_LIBRARY:STRING=
|
||||
|
||||
# HJ, 9/Aug/2011
|
||||
addCMakeVariable VTK_USE_OPENGL_LIBRARY:BOOL=ON
|
||||
|
||||
# include development files in "make install"
|
||||
addCMakeVariable PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON
|
||||
|
||||
# new alternative to "make HTMLDocumentation"
|
||||
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON
|
||||
|
||||
%ifos darwin
|
||||
# Additional installation rules for Mac OS X
|
||||
addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-%{version}/Applications/ParaView-3.10.1_extra_install_Darwin.cmake
|
||||
%endif
|
||||
|
||||
# Add the value of _qmakePath for QT_QMAKE_EXECUTABLE
|
||||
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=%{_qmakePath}
|
||||
|
||||
echo "CMAKE_VARIABLES: $CMAKE_VARIABLES"
|
||||
|
||||
mkdir -p ./buildObj
|
||||
cd ./buildObj
|
||||
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \
|
||||
$CMAKE_VARIABLES \
|
||||
..
|
||||
|
||||
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||
make -j $WM_NCOMPPROCS
|
||||
|
||||
%install
|
||||
# On OpenSUSE, rpmbuild, will choke when detecting unreferenced symlinks
|
||||
# created during installation.
|
||||
# Qt version 4.6.3 will generate some unreferenced symlinks when
|
||||
# ParaView is compiled and installed. By enabling the following
|
||||
# environment variable, the command brp-symlink will still complain
|
||||
# about missing link targets, but it won't stop rpmbuild from generating
|
||||
# the final rpm.
|
||||
# For all other Unix distros, this is a no-op.
|
||||
export NO_BRP_STALE_LINK_ERROR=yes
|
||||
|
||||
cd buildObj
|
||||
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 PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||
export PARAVIEW_BIN_DIR=\$PARAVIEW_DIR/bin
|
||||
export PARAVIEW_LIB_DIR=\$PARAVIEW_DIR/lib
|
||||
export PARAVIEW_INCLUDE_DIR=\$PARAVIEW_DIR/include
|
||||
|
||||
export PARAVIEW_VERSION=%{version}
|
||||
|
||||
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
|
||||
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
|
||||
# specified directory to see if a given library is a paraview plugin.
|
||||
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
|
||||
# startup of paraview or even make paraview crash on startup.
|
||||
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview_plugins
|
||||
|
||||
[ -d \$PARAVIEW_LIB_DIR/paraview-3.10 ] && _foamAddLib \$PARAVIEW_LIB_DIR/paraview-3.10
|
||||
|
||||
# Enable access to the package applications if present
|
||||
[ -d \$PARAVIEW_BIN_DIR ] && _foamAddPath \$PARAVIEW_BIN_DIR
|
||||
|
||||
# Additional binary path if running on Mac OS X
|
||||
[ -d \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ] && _foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
|
||||
|
||||
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 PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||
setenv PARAVIEW_BIN_DIR \$PARAVIEW_DIR/bin
|
||||
setenv PARAVIEW_LIB_DIR \$PARAVIEW_DIR/lib
|
||||
setenv PARAVIEW_INCLUDE_DIR \$PARAVIEW_DIR/include
|
||||
|
||||
setenv PARAVIEW_VERSION %{version}
|
||||
|
||||
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
|
||||
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
|
||||
# specified directory to see if a given library is a paraview plugin.
|
||||
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
|
||||
# startup of paraview or even make paraview crash on startup.
|
||||
setenv PV_PLUGIN_PATH \$FOAM_LIBBIN/paraview_plugins
|
||||
|
||||
if ( -e \$PARAVIEW_BIN_DIR ) then
|
||||
_foamAddPath \$PARAVIEW_BIN_DIR
|
||||
endif
|
||||
|
||||
if ( -e \$PARAVIEW_LIB_DIR/paraview-3.10 ) then
|
||||
_foamAddLib \$PARAVIEW_LIB_DIR/paraview-3.10
|
||||
endif
|
||||
|
||||
|
||||
# Additional binary path if running on Mac OS X
|
||||
if ( -e \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ) then
|
||||
_foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
|
||||
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
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_installPrefix}
|
||||
|
11
ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec
vendored
11
ThirdParty/rpmBuild/SPECS/ParaView-3.8.1.spec
vendored
|
@ -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
|
||||
|
@ -166,7 +169,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 +188,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"
|
||||
|
||||
|
@ -259,6 +262,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
%clean
|
||||
|
||||
%files
|
||||
|
|
9
ThirdParty/rpmBuild/SPECS/Python-2.7.spec
vendored
9
ThirdParty/rpmBuild/SPECS/Python-2.7.spec
vendored
|
@ -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
|
||||
|
@ -99,7 +102,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"
|
||||
|
||||
|
@ -135,6 +138,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
155
ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec
vendored
Normal file
155
ThirdParty/rpmBuild/SPECS/bison-2.4.3.spec
vendored
Normal file
|
@ -0,0 +1,155 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / 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)}
|
||||
|
||||
# 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 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.
|
||||
(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}
|
||||
|
11
ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec
vendored
11
ThirdParty/rpmBuild/SPECS/cmake-2.8.3.spec
vendored
|
@ -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
|
||||
|
@ -93,13 +96,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"
|
||||
|
||||
|
@ -135,6 +138,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
154
ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec
vendored
Normal file
154
ThirdParty/rpmBuild/SPECS/flex-2.5.35.spec
vendored
Normal file
|
@ -0,0 +1,154 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / 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)}
|
||||
|
||||
# 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 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.
|
||||
(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}
|
||||
|
45
ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec
vendored
45
ThirdParty/rpmBuild/SPECS/gcc-4.4.5.spec
vendored
|
@ -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
|
||||
|
@ -93,7 +96,11 @@ 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
|
||||
export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
|
||||
|
||||
mkdir ./objBuildDir
|
||||
cd ./objBuildDir
|
||||
|
@ -111,7 +118,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 +133,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 +148,29 @@ 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.
|
||||
(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}/bin
|
||||
%{_installPrefix}/etc
|
||||
%{_installPrefix}/include
|
||||
%{_installPrefix}/info
|
||||
%{_installPrefix}/lib
|
||||
%{_installPrefix}/libexec
|
||||
%{_installPrefix}/man
|
||||
%{_installPrefix}/share
|
||||
%{_installPrefix}
|
||||
|
||||
|
|
12
ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec
vendored
12
ThirdParty/rpmBuild/SPECS/gcc-4.5.1.spec
vendored
|
@ -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
|
||||
|
@ -93,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
|
||||
|
@ -113,7 +116,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"
|
||||
|
||||
|
@ -153,6 +156,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
9
ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec
vendored
9
ThirdParty/rpmBuild/SPECS/gmp-5.0.1.spec
vendored
|
@ -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
|
||||
|
@ -97,7 +100,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 +140,10 @@ 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.
|
||||
(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}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -169,6 +172,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
155
ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec
vendored
Normal file
155
ThirdParty/rpmBuild/SPECS/m4-1.4.16.spec
vendored
Normal file
|
@ -0,0 +1,155 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / 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)}
|
||||
|
||||
# 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 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.
|
||||
(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}
|
||||
|
10
ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
vendored
10
ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
vendored
|
@ -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
|
||||
|
@ -111,7 +114,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"
|
||||
|
||||
|
@ -156,6 +159,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
10
ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec
vendored
10
ThirdParty/rpmBuild/SPECS/metis-5.0pre2.spec
vendored
|
@ -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
|
||||
|
@ -70,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
|
||||
|
@ -158,6 +161,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
12
ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec
vendored
12
ThirdParty/rpmBuild/SPECS/mpc-0.8.2.spec
vendored
|
@ -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
|
||||
|
@ -93,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} \
|
||||
|
@ -104,7 +107,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"
|
||||
|
||||
|
@ -144,6 +147,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
18
ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec
vendored
18
ThirdParty/rpmBuild/SPECS/mpfr-3.0.0.spec
vendored
|
@ -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
|
||||
|
@ -70,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
|
||||
|
@ -100,7 +103,8 @@ 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"
|
||||
|
||||
|
@ -140,13 +144,15 @@ 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.
|
||||
(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}/etc
|
||||
%{_installPrefix}/include
|
||||
%{_installPrefix}/lib
|
||||
%{_installPrefix}/share
|
||||
%{_installPrefix}
|
||||
|
||||
|
|
158
ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec
vendored
Normal file
158
ThirdParty/rpmBuild/SPECS/mpfr-3.0.1.spec
vendored
Normal file
|
@ -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}
|
||||
|
17
ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec
vendored
17
ThirdParty/rpmBuild/SPECS/openmpi-1.4.1.spec
vendored
|
@ -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
|
||||
|
@ -97,6 +100,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 +113,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 +122,7 @@ Group: Development/Tools
|
|||
--disable-mpi-f90 \
|
||||
--disable-mpi-cxx \
|
||||
--disable-mpi-profile \
|
||||
--without-slurm \
|
||||
$mpiWith \
|
||||
;
|
||||
|
||||
|
@ -122,7 +130,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"
|
||||
|
||||
|
@ -162,6 +170,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
47
ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec
vendored
47
ThirdParty/rpmBuild/SPECS/openmpi-1.4.3.spec
vendored
|
@ -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
|
||||
|
@ -84,6 +87,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 +97,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 +146,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 +170,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 +219,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"
|
||||
|
@ -224,9 +234,14 @@ 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}/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}/*
|
||||
%{_installPrefix}
|
||||
|
|
21
ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec
vendored
21
ThirdParty/rpmBuild/SPECS/openmpi-1.5.spec
vendored
|
@ -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
|
||||
|
@ -97,6 +100,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 +113,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 +130,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 +168,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 +217,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"
|
||||
|
@ -224,6 +232,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -97,13 +100,19 @@ 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}
|
||||
# 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"
|
||||
|
@ -140,20 +149,16 @@ 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}/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}/bin
|
||||
%{_installPrefix}/etc
|
||||
%{_installPrefix}/lib
|
||||
%{_installPrefix}/imports
|
||||
%{_installPrefix}/include
|
||||
%{_installPrefix}/mkspecs
|
||||
%{_installPrefix}/plugins
|
||||
%{_installPrefix}/phrasebooks
|
||||
%{_installPrefix}/q3porting.xml
|
||||
%{_installPrefix}/translations
|
||||
%{_installPrefix}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -154,6 +157,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}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
154
ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec
vendored
Normal file
154
ThirdParty/rpmBuild/SPECS/zoltan-3.5.spec
vendored
Normal file
|
@ -0,0 +1,154 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / 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)}
|
||||
|
||||
# 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 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.
|
||||
(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}
|
||||
|
100
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
100
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
|
@ -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 ""
|
||||
|
||||
#
|
||||
|
@ -49,13 +51,42 @@ echo ""
|
|||
#
|
||||
rpm_make()
|
||||
{
|
||||
package="$1"
|
||||
# Avoid word splitting on 'space'
|
||||
IFS=$'\n'
|
||||
|
||||
# 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.
|
||||
|
@ -70,41 +101,36 @@ 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.
|
||||
#
|
||||
[ "$#" -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
|
||||
|
@ -143,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:"
|
||||
|
@ -162,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;
|
||||
|
||||
|
|
Reference in a new issue