1 |
|
### RPM external jimmy 4.2 |
2 |
– |
## BUILDIF case $(uname):$(uname -m) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac |
2 |
|
|
3 |
|
Requires: herwig |
4 |
|
Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz |
5 |
< |
Patch: jimmy-4.2-gfortran |
5 |
> |
Patch0: jimmy-4.2-gfortran |
6 |
> |
Patch1: jimmy-4.2-macosx |
7 |
> |
|
8 |
> |
%if "%(echo %cmsos | grep osx >/dev/null && echo true)" == "true" |
9 |
> |
Requires: gfortran-macosx |
10 |
> |
%endif |
11 |
|
|
12 |
|
%prep |
13 |
|
%setup -q -n %{n}/%{realversion} |
14 |
|
case %gccver in |
15 |
|
4.*) |
16 |
< |
%patch -p0 |
16 |
> |
%patch0 -p0 |
17 |
> |
%patch1 -p3 |
18 |
|
;; |
19 |
|
esac |
20 |
|
|
21 |
+ |
|
22 |
|
%build |
23 |
< |
./configure --with-herwig=$HERWIG_ROOT |
24 |
< |
make |
23 |
> |
# NOTE: only in recent architectures we build static libraries. |
24 |
> |
case %cmsos in |
25 |
> |
slc5_*_gcc4[01234]*) ;; |
26 |
> |
*) BUILD_PRODUCT=lib_archive ;; |
27 |
> |
esac |
28 |
> |
./configure $PLATF_CONFIG_OPTS --with-herwig=$HERWIG_ROOT |
29 |
> |
# Looks like ./configure does not do all it should do to have our |
30 |
> |
# version of herwig picked up at link time. |
31 |
> |
# Workaround until they fix the GENESER makefiles is to define |
32 |
> |
# the variable and use it directly inside "Makeshared". |
33 |
> |
make HERWIG_ROOT=$HERWIG_ROOT $BUILD_PRODUCT |
34 |
|
|
35 |
|
%install |
36 |
|
tar -c lib include | tar -x -C %i |
37 |
< |
# SCRAM ToolBox toolfile |
38 |
< |
mkdir -p %i/etc/scram.d |
24 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml |
25 |
< |
<tool name="jimmy" version="%v"> |
26 |
< |
<lib name="jimmy"/> |
27 |
< |
<client> |
28 |
< |
<environment name="JIMMY_BASE" default="%i"/> |
29 |
< |
<environment name="LIBDIR" default="$JIMMY_BASE/lib"/> |
30 |
< |
<environment name="INCLUDE" default="$JIMMY_BASE/include"/> |
31 |
< |
</client> |
32 |
< |
<use name="f77compiler"/> |
33 |
< |
<use name="herwig"/> |
34 |
< |
</tool> |
35 |
< |
EOF_TOOLFILE |
36 |
< |
|
37 |
< |
%post |
38 |
< |
%{relocateConfig}etc/scram.d/%n.xml |
37 |
> |
find %i/lib/archive -name "*.a" -exec mv {} %i/lib \; |
38 |
> |
rm -rf %i/lib/archive |