forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charybdis.spec
34 lines (28 loc) · 877 Bytes
/
charybdis.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
### RPM external charybdis 1.003
Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz
Patch0: charybdis-1003-macosx
Patch1: charybdis-1.003-archive-only
Requires: pythia6
Requires: lhapdf
Requires: zlib
%define keep_archives true
%if "%(case %cmsplatf in (osx*_*_gcc421) echo true ;; (*) echo false ;; esac)" == "true"
Requires: gfortran-macosx
%endif
%prep
%setup -q -n %{n}/%{realversion}
%patch0 -p3
# On osx we build only the archive libraries to avoid issues with the common
# blocks.
case %cmsos in
osx*)
%patch1 -p3
;;
esac
./configure --lcgplatform=%cmsplatf --pythia_hadronization
%build
make FC="`which gfortran` -fPIC" PYTHIA6_ROOT=$PYTHIA6_ROOT LHAPDF_ROOT=$LHAPDF_ROOT ZLIB_ROOT=$ZLIB_ROOT
%install
tar -c lib include | tar -x -C %i
find %i/lib/archive -name "*.a" -exec mv {} %i/lib \;
rm -rf %i/lib/archive