ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lapack.spec
(Generate patch)

Comparing COMP/CMSDIST/lapack.spec (file contents):
Revision 1.5 by elmer, Thu Feb 10 16:48:47 2011 UTC vs.
Revision 1.11 by eulisse, Wed Sep 21 14:44:01 2011 UTC

# Line 1 | Line 1
1 < ### RPM external lapack 3.3.0
2 < # NB: based on http://www.netlib.org/lapack/rpms
3 < Source0: http://www.netlib.org/lapack/lapack.tgz
4 < Source1: http://www.netlib.org/lapack/manpages.tgz
5 < Source2: lapack-makefile-blas
6 < Source3: lapack-makefile-lapack
7 < #Source4: lapack-BLAS_cgbmv_x-f2c
1 > ### RPM external lapack 3.3.1
2 > Source0: http://www.netlib.org/lapack/lapack-%realversion.tgz
3 >
4 > Requires: cmake
5 >
6 > %define keep_archives true
7 > %if "%(case %cmsplatf in (osx*_*_gcc421) echo true ;; (*) echo false ;; esac)" == "true"
8 > Requires: gfortran-macosx
9 > %endif
10  
11   %prep
12   %setup -q -n lapack-%{realversion}
11 %setup -q -D -T -a 1 -n lapack-%{realversion}
12 cp %{_sourcedir}/lapack-makefile-blas BLAS/SRC/Makefile
13 cp %{_sourcedir}/lapack-makefile-lapack SRC/Makefile
14 #cp %{_sourcedir}/lapack-BLAS_cgbmv_x-f2c BLAS/SRC/BLAS_cgbmv_x-f2c.c
15
16 cp make.inc.example make.inc
17 perl -p -i -e 's|^OPTS     =|OPTS     = -fPIC|' make.inc
13  
14   %build
15 < cd BLAS/SRC
16 < FFLAGS="$RPM_OPT_FLAGS" make static
17 < cp libblas.a ../..
18 < make clean
19 < FFLAGS="$RPM_OPT_FLAGS -fPIC" make static shared
20 < cp libblas.a ../../libblas_pic.a
26 < cp libblas.so.2.0.1 ../..
27 < cd ../..
28 < ln -s libblas.so.2.0.1 libblas.so
29 < cd SRC
30 < FFLAGS="$RPM_OPT_FLAGS" make static
31 < cp liblapack.a ..
32 < make clean
33 < FFLAGS="$RPM_OPT_FLAGS -fPIC" make static shared
34 < cp liblapack.a ../liblapack_pic.a
35 < cp liblapack.so.2.0.1 ..  
15 > # We remove the testing directory because it seems
16 > # to not build correctly on the mac.
17 > rm -rf TESTING
18 > perl -p -i -e 's|add_subdirectory[(]TESTING[)]||' CMakeLists.txt
19 > cmake . -DBUILD_SHARED_LIBS=YES -DCMAKE_Fortran_COMPILER="`which gfortran`" -DCMAKE_INSTALL_PREFIX="%i"
20 > make %{makeprocesses}
21  
22   %install
23 < mkdir -p %i/lib
24 < cp -f lib*.so* lib*.a %i/lib
25 <
26 < cd %i/lib
27 < ln -sf liblapack.so.2.0.1 liblapack.so
28 < ln -sf liblapack.so.2.0.1 liblapack.so.2
29 < ln -sf liblapack.so.2.0.1 liblapack.so.2.0
30 < ln -sf libblas.so.2.0.1 libblas.so
31 < ln -sf libblas.so.2.0.1 libblas.so.2
47 < ln -sf libblas.so.2.0.1 libblas.so.2.0
48 <
23 > make install
24 > # We remove pkg-config files for two reasons:
25 > # * it's actually not required (macosx does not even have it).
26 > # * rpm 4.8 adds a dependency on the system /usr/bin/pkg-config
27 > #   on linux.
28 > # In the case at some point we build a package that can be build
29 > # only via pkg-config we have to think on how to ship our own
30 > # version.
31 > rm -rf %i/lib/pkgconfig

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines