source: projects/specs/trunk/o/openblas/openblas-vl.spec @ 12557

Revision 12557, 26.8 KB checked in by tomop, 16 months ago (diff)

updated 2 packages

neon-0.31.2-1

openblas-0.3.13-1

Line 
1# Version of bundled lapack
2%global lapackver 3.8.0
3%global lapacke 1
4
5# Build 64-bit interface binaries?
6%ifarch %{ix86}
7%global build64 0
8%global libblas    libblas.so.3 libcblas.so.3
9%global liblapack  liblapack.so.3 liblapacke.so.3
10%endif
11%ifarch x86_64
12%global build64 1
13%global libblas    libblas.so.3()(64bit) libcblas.so.3()(64bit)
14%global liblapack  liblapack.so.3()(64bit) liblapacke.so.3()(64bit)
15%endif
16
17Summary: An optimized BLAS library based on GotoBLAS2
18Name:    openblas
19Version: 0.3.13
20Release: 1%{?_dist_release}
21
22Group:   system
23License: BSD
24URL:     https://github.com/xianyi/OpenBLAS/
25
26# Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz
27Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz#/OpenBLAS-%{version}.tar.gz
28
29# pkg-config file (modoified)
30Source11: blas.pc.in
31Source12: cblas.pc.in
32Source13: lapack.pc.in
33Source14: lapacke.pc.in
34
35# Drop extra p from threaded library name
36Patch1: openblas-0.2.5-libname.patch
37# # Supply the proper flags to the test makefile
38# Patch2: openblas-0.2.19-tests.patch
39# # Disable CPU affinity, from upstream
40# Patch3: https://patch-diff.githubusercontent.com/raw/xianyi/OpenBLAS/pull/1495.patch
41
42BuildRoot: %{_tmppath}/%{name}-%{version}-root
43BuildRequires: gcc-gfortran
44
45Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
46
47ExclusiveArch: x86_64 %{ix86}
48
49%global base_description \
50OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
51version. The project is supported by the Lab of Parallel Software and \
52Computational Science, ISCAS. http://www.rdcps.ac.cn
53
54%description
55%{base_description}
56
57
58%package Rblas
59Summary: A version of OpenBLAS for R to use as libRblas
60Group:   system
61
62%description Rblas
63%{base_description}
64
65
66%package openmp
67Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
68Group:   system
69Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
70
71%description openmp
72%{base_description}
73
74This package contains the library compiled with OpenMP support.
75
76
77%package threads
78Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
79Group:   system
80Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
81
82%description threads
83%{base_description}
84
85This package contains the library compiled with threading support.
86
87
88%if %build64
89%package serial64
90Summary: An optimized BLAS library based on GotoBLAS2, serial version
91Group:   system
92Provides: blas64 lapack64 = %{lapackver}
93
94%description serial64
95%{base_description}
96
97This package contains the sequential library compiled with a 64-bit
98interface.
99
100
101%package serial64_
102Summary: An optimized BLAS library based on GotoBLAS2, serial version
103Group:   system
104Provides: blas64 lapack64 = %{lapackver}
105
106%description serial64_
107%{base_description}
108
109This package contains the sequential library compiled with a 64-bit
110interface and a symbol name suffix.
111
112
113%package openmp64
114Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
115Group:   system
116Provides: blas64 lapack64 = %{lapackver}
117
118%description openmp64
119%{base_description}
120
121This package contains the library compiled with OpenMP support and
12264-bit interface.
123
124
125%package openmp64_
126Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
127Group:   system
128Provides: blas64 lapack64 = %{lapackver}
129
130%description openmp64_
131%{base_description}
132
133This package contains the library compiled with OpenMP support and
13464-bit interface and a symbol name suffix.
135
136
137%package threads64
138Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
139Group:   system
140Provides: blas64 lapack64 = %{lapackver}
141
142%description threads64
143%{base_description}
144
145This package contains the library compiled with threading support and
14664-bit interface.
147
148
149%package threads64_
150Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
151Group:   system
152Provides: blas64 lapack64 = %{lapackver}
153
154%description threads64_
155%{base_description}
156
157This package contains the library compiled with threading support and
15864-bit interface and a symbol name suffix.
159%endif
160
161
162%package devel
163Summary:  Development headers and libraries for OpenBLAS
164Group:    programming
165Requires: %{name} = %{version}-%{release}
166Requires: %{name}-openmp = %{version}-%{release}
167Requires: %{name}-threads = %{version}-%{release}
168
169%description devel
170%{base_description}
171
172This package contains the development headers and libraries.
173
174
175%package static
176Summary:  Static version of OpenBLAS
177Group:    programming
178Requires: %{name}-devel = %{version}-%{release}
179
180%description static
181%{base_description}
182
183This package contains the static libraries.
184
185
186%if %build64
187%package -n %{name}64-devel
188Summary:  Development headers and libraries for OpenBLAS (64bit)
189Group:    programming
190Requires: %{name}-openmp64 = %{version}-%{release}
191Requires: %{name}-threads64 = %{version}-%{release}
192Requires: %{name}-serial64 = %{version}-%{release}
193Requires: %{name}-openmp64_ = %{version}-%{release}
194Requires: %{name}-threads64_ = %{version}-%{release}
195Requires: %{name}-serial64_ = %{version}-%{release}
196Requires: %{name}-devel = %{version}-%{release}
197
198%description  -n %{name}64-devel
199%{base_description}
200
201This package contains the development headers and libraries
202 compiled with a 64-bit interface.
203
204
205%package -n %{name}64-static
206Summary:  Static version of OpenBLAS (64bit)
207Group:    programming
208Requires: %{name}64-devel = %{version}-%{release}
209
210%description -n %{name}64-static
211%{base_description}
212
213This package contains the static libraries
214 compiled with a 64-bit interface.
215%endif
216
217
218%debug_package
219
220
221%prep
222%setup -q -c -T
223
224# Untar source
225tar zxf %{SOURCE0}
226cd OpenBLAS-%{version}
227%patch1 -p1 -b .libname
228# %patch2 -p1 -b .tests
229# %patch3 -p1 -b .affinity
230
231# Fix source permissions
232find -name \*.f -exec chmod 644 {} \;
233
234# Make serial, threaded and OpenMP versions; as well as 64-bit versions
235# Also make an libRblas.so
236cd ..
237cp -ar OpenBLAS-%{version} openmp
238cp -ar OpenBLAS-%{version} threaded
239
240%if %build64
241for d in {serial,threaded,openmp}64{,_}; do
242    cp -ar OpenBLAS-%{version} $d
243done
244%endif
245cp -ar OpenBLAS-%{version} Rblas
246mv OpenBLAS-%{version} serial
247
248# Hackup Rblas Makefiles
249sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/Makefile
250sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/exports/Makefile
251sed -i 's|@ln -fs $(LIBSONAME) $(LIBPREFIX).so|#@ln -fs $(LIBSONAME) $(LIBPREFIX).so|g' Rblas/Makefile
252
253%build
254# Maximum possible amount of processors
255NMAX="NUM_THREADS=128"
256TARGET="TARGET=CORE2 DYNAMIC_ARCH=1"
257export AVX="NO_AVX2=1"
258
259FCOMMON="%{optflags} -fPIC -frecursive"
260
261make -C Rblas      $TARGET USE_THREAD=0 USEOPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libRblas" LIBSONAME="libRblas.so" $AVX $LAPACKE INTERFACE64=0
262
263# Declare some necessary build flags
264COMMON="%{optflags} -fPIC"
265FCOMMON="$COMMON -frecursive"
266make -C serial     $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas"      $AVX $LAPACKE INTERFACE64=0
267make -C threaded   $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp"     $AVX $LAPACKE INTERFACE64=0
268
269# USE_THREAD determines use of SMP, not of pthreads
270COMMON="%{optflags} -fPIC -fopenmp -pthread"
271FCOMMON="$COMMON -frecursive"
272make -C openmp     $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso"     $AVX $LAPACKE INTERFACE64=0
273
274%if %build64
275COMMON="%{optflags} -fPIC"
276FCOMMON="$COMMON -frecursive -fdefault-integer-8"
277make -C serial64   $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64"    $AVX $LAPACKE INTERFACE64=1
278make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64"   $AVX $LAPACKE INTERFACE64=1
279
280COMMON="%{optflags} -fPIC -fopenmp -pthread"
281FCOMMON="$COMMON -frecursive -fdefault-integer-8"
282make -C openmp64   $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso64"   $AVX $LAPACKE INTERFACE64=1
283
284COMMON="%{optflags} -fPIC"
285FCOMMON="$COMMON -frecursive  -fdefault-integer-8"
286make -C serial64_   $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64_"  $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
287make -C threaded64_ $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
288
289COMMON="%{optflags} -fPIC -fopenmp -pthread"
290FCOMMON="$COMMON -frecursive -fdefault-integer-8"
291make -C openmp64_   $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
292%endif
293
294%install
295rm -rf %{buildroot}
296# Install serial library and headers
297make -C serial USE_THREAD=0 PREFIX=%{buildroot} OPENBLAS_LIBRARY_DIR=%{buildroot}%{_libdir}/ OPENBLAS_INCLUDE_DIR=%{buildroot}%{_includedir}/%{name} OPENBLAS_BINARY_DIR=%{buildroot}%{_bindir} OPENBLAS_CMAKE_DIR=%{buildroot}%{_libdir}/cmake install
298
299slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
300mv %{buildroot}%{_libdir}/${slibname}.a \
301   %{buildroot}%{_libdir}/lib%{name}.a
302if [[ "$suffix" != "" ]]; then
303   sname=$(echo $slibname | sed "s|$suffix||g")
304   mv %{buildroot}%{_libdir}/${slibname}.so \
305      %{buildroot}%{_libdir}/${sname}.so
306else
307   sname=${slibname}
308fi
309
310# Install the Rblas library
311mkdir -p %{buildroot}%{_libdir}/R/lib/
312install -p -m 755 Rblas/libRblas.so %{buildroot}%{_libdir}/R/lib/
313
314# Install the OpenMP library
315olibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o|g"`
316install -D -p -m 644 openmp/${olibname}.a \
317        %{buildroot}%{_libdir}/lib%{name}o.a
318if [[ "$suffix" != "" ]]; then
319   oname=$(echo $olibname | sed "s|$suffix||g")
320else
321   oname=${olibname}
322fi
323install -D -p -m 755 openmp/${olibname}.so \
324        %{buildroot}%{_libdir}/${oname}.so
325
326# Install the threaded library
327plibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p|g"`
328install -D -p -m 644 threaded/${plibname}.a \
329        %{buildroot}%{_libdir}/lib%{name}p.a
330if [[ "$suffix" != "" ]]; then
331   pname=$(echo $plibname | sed "s|$suffix||g")
332else
333   pname=${plibname}
334fi
335install -D -p -m 755 threaded/${plibname}.so \
336        %{buildroot}%{_libdir}/${pname}.so
337
338# Install the 64-bit interface libraries
339%if %build64
340slibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64|g"`
341install -D -p -m 644 serial64/${slibname64}.a \
342        %{buildroot}%{_libdir}/lib%{name}64.a
343slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"`
344install -D -p -m 644 serial64_/${slibname64_}.a \
345        %{buildroot}%{_libdir}/lib%{name}64_.a
346
347if [[ "$suffix" != "" ]]; then
348   sname64=$(echo ${slibname64} | sed "s|$suffix||g")
349   sname64_=$(echo ${slibname64_} | sed "s|$suffix||g")
350else
351   sname64=${slibname64}
352   sname64_=${slibname64_}
353fi
354install -D -p -m 755 serial64/${slibname64}.so \
355        %{buildroot}%{_libdir}/${sname64}.so
356install -D -p -m 755 serial64_/${slibname64_}.so \
357        %{buildroot}%{_libdir}/${sname64_}.so
358
359olibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64|g"`
360install -D -p -m 644 openmp64/${olibname64}.a \
361        %{buildroot}%{_libdir}/lib%{name}o64.a
362olibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64_|g"`
363install -D -p -m 644 openmp64_/${olibname64_}.a \
364        %{buildroot}%{_libdir}/lib%{name}o64_.a
365
366if [[ "$suffix" != "" ]]; then
367   oname64=$(echo ${olibname64} | sed "s|$suffix||g")
368   oname64_=$(echo ${olibname64_} | sed "s|$suffix||g")
369else
370   oname64=${olibname64}
371   oname64_=${olibname64_}
372fi
373install -D -p -m 755 openmp64/${olibname64}.so \
374        %{buildroot}%{_libdir}/${oname64}.so
375install -D -p -m 755 openmp64_/${olibname64_}.so \
376        %{buildroot}%{_libdir}/${oname64_}.so
377
378plibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64|g"`
379install -D -p -m 644 threaded64/${plibname64}.a \
380        %{buildroot}%{_libdir}/lib%{name}p64.a
381plibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64_|g"`
382install -D -p -m 644 threaded64_/${plibname64_}.a \
383        %{buildroot}%{_libdir}/lib%{name}p64_.a
384
385if [[ "$suffix" != "" ]]; then
386   pname64=$(echo $plibname64 | sed "s|$suffix||g")
387   pname64_=$(echo $plibname64_ | sed "s|$suffix||g")
388else
389   pname64=${plibname64}
390   pname64_=${plibname64_}
391fi
392install -D -p -m 755 threaded64/${plibname64}.so \
393        %{buildroot}%{_libdir}/${pname64}.so
394install -D -p -m 755 threaded64_/${plibname64_}.so \
395        %{buildroot}%{_libdir}/${pname64_}.so
396%endif
397
398# Fix symlinks
399pushd %{buildroot}%{_libdir}
400# Serial libraries
401ln -sf ${sname}.so lib%{name}.so
402ln -sf ${sname}.so lib%{name}.so.0
403# OpenMP libraries
404ln -sf ${oname}.so lib%{name}o.so
405ln -sf ${oname}.so lib%{name}o.so.0
406# Threaded libraries
407ln -sf ${pname}.so lib%{name}p.so
408ln -sf ${pname}.so lib%{name}p.so.0
409
410%if %build64
411# Serial libraries
412ln -sf ${sname64}.so lib%{name}64.so
413ln -sf ${sname64}.so lib%{name}64.so.0
414ln -sf ${sname64_}.so lib%{name}64_.so
415ln -sf ${sname64_}.so lib%{name}64_.so.0
416# OpenMP libraries
417ln -sf ${oname64}.so lib%{name}o64.so
418ln -sf ${oname64}.so lib%{name}o64.so.0
419ln -sf ${oname64_}.so lib%{name}o64_.so
420ln -sf ${oname64_}.so lib%{name}o64_.so.0
421# Threaded libraries
422ln -sf ${pname64}.so lib%{name}p64.so
423ln -sf ${pname64}.so lib%{name}p64.so.0
424ln -sf ${pname64_}.so lib%{name}p64_.so
425ln -sf ${pname64_}.so lib%{name}p64_.so.0
426%endif
427popd
428
429# Get rid of generated CMake config
430rm -rf %{buildroot}%{_libdir}/cmake
431
432# pkg-config
433# fix libdir/includedir in openblas.pc
434pushd %{buildroot}%{_libdir}/pkgconfig
435mv openblas.pc tmp
436echo "libdir=%{_libdir}" > openblas.pc
437echo "includedir=%{_includedir}/%{name}" >> openblas.pc
438sed -e "1,2d" tmp >> openblas.pc
439rm -f tmp
440
441sed "s/-lopenblas/-lopenblaso/" openblas.pc >> openblaso.pc
442sed "s/-lopenblas/-lopenblasp/" openblas.pc >> openblasp.pc
443
444%if %build64
445sed "s/-lopenblas/-lopenblas64/" openblas.pc >> openblas64.pc
446sed "s/-lopenblas/-lopenblaso64/" openblas.pc >> openblaso64.pc
447sed "s/-lopenblas/-lopenblasp64/" openblas.pc >> openblasp64.pc
448sed "s/-lopenblas/-lopenblas64_/" openblas.pc >> openblas64_.pc
449sed "s/-lopenblas/-lopenblaso64_/" openblas.pc >> openblaso64_.pc
450sed "s/-lopenblas/-lopenblasp64_/" openblas.pc >> openblasp64_.pc
451%endif
452popd
453
454# blas/lapack
455mkdir -p %{buildroot}%{_libdir}/%{name}
456
457pushd %{buildroot}%{_libdir}/%{name}
458cp %{SOURCE11} blas.pc
459cp %{SOURCE12} cblas.pc
460cp %{SOURCE13} lapack.pc
461cp %{SOURCE14} lapacke.pc
462
463# blas
464sed -i 's|@libdir@|%{_libdir}|g' blas.pc
465sed -i 's|@LAPACK_VERSION@|%{version}|g' blas.pc
466
467# cblas
468sed -i 's|@libdir@|%{_libdir}|g' cblas.pc
469sed -i 's|@includedir@|%{_includedir}/%{name}|g' cblas.pc
470sed -i 's|@LAPACK_VERSION@|%{version}|g' cblas.pc
471
472# lapack
473sed -i 's|@libdir@|%{_libdir}|g' lapack.pc
474sed -i 's|@LAPACK_VERSION@|%{version}|g' lapack.pc
475
476# lapacke
477sed -i 's|@libdir@|%{_libdir}|g' lapacke.pc
478sed -i 's|@includedir@|%{_includedir}/%{name}|g' lapacke.pc
479sed -i 's|@LAPACK_VERSION@|%{version}|g' lapacke.pc
480
481%if %build64
482sed 's/-lblas/-blas64_/g' blas.pc > blas64.pc
483sed 's/-lcblas/-cblas64_/g' cblas.pc > cblas64.pc
484sed 's/-llapack/-llapack64_/g' lapack.pc > lapack64.pc
485sed 's/-llapacke/-llapacke64_/g' lapacke.pc > lapacke64.pc
486%endif
487popd
488
489
490%post
491update-alternatives \
492    --install %{_libdir}/libblas.so.3 libblas.so.3 \
493              %{_libdir}/libopenblas.so.0 40 \
494    --slave   %{_libdir}/libcblas.so.3 libcblas.so.3 \
495              %{_libdir}/libopenblas.so.0
496update-alternatives \
497    --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
498              %{_libdir}/libopenblas.so.0 40 \
499    --slave   %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
500              %{_libdir}/libopenblas.so.0
501/sbin/ldconfig
502
503%preun
504if [ "$1" = "0" ]
505then
506    update-alternatives \
507        --remove libblas.so.3 %{_libdir}/libopenblas.so.0
508    update-alternatives \
509        --remove liblapack.so.3 %{_libdir}/libopenblas.so.0
510fi
511
512%postun -p /sbin/ldconfig
513
514
515%post openmp
516update-alternatives \
517    --install %{_libdir}/libblas.so.3 libblas.so.3 \
518              %{_libdir}/libopenblaso.so.0 42 \
519    --slave   %{_libdir}/libcblas.so.3 libcblas.so.3 \
520              %{_libdir}/libopenblaso.so.0
521update-alternatives \
522    --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
523              %{_libdir}/libopenblaso.so.0 42 \
524    --slave   %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
525              %{_libdir}/libopenblaso.so.0
526/sbin/ldconfig
527
528%preun openmp
529if [ "$1" = "0" ]
530then
531    update-alternatives \
532        --remove libblas.so.3 %{_libdir}/libopenblaso.so.0
533    update-alternatives \
534        --remove liblapack.so.3 %{_libdir}/libopenblaso.so.0
535fi
536
537%postun openmp -p /sbin/ldconfig
538
539
540%post threads
541update-alternatives \
542    --install %{_libdir}/libblas.so.3 libblas.so.3 \
543              %{_libdir}/libopenblasp.so.0 45 \
544    --slave   %{_libdir}/libcblas.so.3 libcblas.so.3 \
545              %{_libdir}/libopenblasp.so.0
546update-alternatives \
547    --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
548              %{_libdir}/libopenblasp.so.0 45 \
549    --slave   %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
550              %{_libdir}/libopenblasp.so.0
551/sbin/ldconfig
552
553%preun threads
554if [ "$1" = "0" ]
555then
556    update-alternatives \
557        --remove libblas.so.3 %{_libdir}/libopenblasp.so.0
558    update-alternatives \
559        --remove liblapack.so.3 %{_libdir}/libopenblasp.so.0
560fi
561
562%postun threads -p /sbin/ldconfig
563
564
565%if %build64
566%post serial64 -p /sbin/ldconfig
567%postun serial64 -p /sbin/ldconfig
568
569%post openmp64 -p /sbin/ldconfig
570%postun openmp64 -p /sbin/ldconfig
571
572%post threads64 -p /sbin/ldconfig
573%postun threads64 -p /sbin/ldconfig
574
575
576%post serial64_
577update-alternatives \
578    --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
579              %{_libdir}/libopenblas64_.so.0 40 \
580    --slave   %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
581              %{_libdir}/libopenblas64_.so.0
582update-alternatives \
583    --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
584              %{_libdir}/libopenblas64_.so.0 40
585update-alternatives \
586    --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
587              %{_libdir}/libopenblas64_.so.0 40
588/sbin/ldconfig
589
590%preun serial64_
591if [ "$1" = "0" ]
592then
593    update-alternatives \
594        --remove libblas64_.so.3 %{_libdir}/libopenblas64_.so.0
595    update-alternatives \
596        --remove liblapack64_.so.3 %{_libdir}/libopenblas64_.so.0
597    update-alternatives \
598        --remove liblapacke64_.so.3 %{_libdir}/libopenblas64_.so.0
599fi
600
601%postun serial64_ -p /sbin/ldconfig
602
603
604%post openmp64_
605update-alternatives \
606    --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
607              %{_libdir}/libopenblaso64_.so.0 42 \
608    --slave   %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
609              %{_libdir}/libopenblaso64_.so.0
610update-alternatives \
611    --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
612              %{_libdir}/libopenblaso64_.so.0 42
613update-alternatives \
614    --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
615              %{_libdir}/libopenblaso64_.so.0 42
616/sbin/ldconfig
617
618%preun openmp64_
619if [ "$1" = "0" ]
620then
621    update-alternatives \
622        --remove libblas64_.so.3 %{_libdir}/libopenblaso64_.so.0
623    update-alternatives \
624        --remove liblapack64_.so.3 %{_libdir}/libopenblaso64_.so.0
625    update-alternatives \
626        --remove liblapacke64_.so.3 %{_libdir}/libopenblaso64_.so.0
627fi
628
629%postun openmp64_ -p /sbin/ldconfig
630
631
632%post threads64_
633update-alternatives \
634    --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
635              %{_libdir}/libopenblasp64_.so.0 45 \
636    --slave   %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
637              %{_libdir}/libopenblasp64_.so.0
638update-alternatives \
639    --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
640              %{_libdir}/libopenblasp64_.so.0 45
641update-alternatives \
642    --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
643              %{_libdir}/libopenblasp64_.so.0 45
644/sbin/ldconfig
645
646%preun threads64_
647if [ "$1" = "0" ]
648then
649    update-alternatives \
650        --remove libblas64_.so.3 %{_libdir}/libopenblasp64_.so.0
651    update-alternatives \
652        --remove liblapack64_.so.3 %{_libdir}/libopenblasp64_.so.0
653    update-alternatives \
654        --remove liblapacke64_.so.3 %{_libdir}/libopenblasp64_.so.0
655fi
656
657%postun threads64_ -p /sbin/ldconfig
658%endif
659
660
661%post devel
662update-alternatives \
663    --install %{_libdir}/libblas.so libblas.so \
664              %{_libdir}/libopenblas.so 40 \
665    --slave   %{_libdir}/libcblas.so libcblas.so \
666              %{_libdir}/libopenblas.so \
667    --slave   %{_libdir}/pkgconfig/blas.pc blas.pc \
668              %{_libdir}/%{name}/blas.pc \
669    --slave   %{_libdir}/pkgconfig/cblas.pc cblas.pc \
670              %{_libdir}/%{name}/cblas.pc
671update-alternatives \
672    --install %{_libdir}/liblapack.so liblapack.so \
673              %{_libdir}/libopenblas.so 40 \
674    --slave   %{_libdir}/liblapacke.so liblapacke.so \
675              %{_libdir}/libopenblas.so \
676    --slave   %{_libdir}/pkgconfig/lapack.pc lapack.pc \
677              %{_libdir}/%{name}/lapack.pc \
678    --slave   %{_libdir}/pkgconfig/lapacke.pc lapacke.pc \
679              %{_libdir}/%{name}/lapacke.pc
680/sbin/ldconfig
681
682%preun devel
683if [ "$1" = "0" ]
684then
685    update-alternatives \
686        --remove libblas.so %{_libdir}/libopenblas.so
687    update-alternatives \
688        --remove liblapack.so %{_libdir}/libopenblas.so
689fi
690
691%postun devel -p /sbin/ldconfig
692
693
694%if %build64
695%post -n %{name}64-devel
696update-alternatives \
697    --install %{_libdir}/libblas64_.so libblas64_.so \
698              %{_libdir}/libopenblas64_.so 40 \
699    --slave   %{_libdir}/libcblas64_.so libcblas64_.so \
700              %{_libdir}/libopenblas64_.so \
701    --slave   %{_libdir}/pkgconfig/blas64.pc blas64.pc \
702              %{_libdir}/%{name}/blas64.pc \
703    --slave   %{_libdir}/pkgconfig/cblas64.pc cblas64.pc \
704              %{_libdir}/%{name}/cblas64.pc
705update-alternatives \
706    --install %{_libdir}/liblapack64_.so liblapack64_.so \
707              %{_libdir}/libopenblas64_.so 40 \
708    --slave   %{_libdir}/pkgconfig/lapack64.pc lapack64.pc \
709              %{_libdir}/%{name}/lapack64.pc
710update-alternatives \
711    --install %{_libdir}/liblapacke64_.so liblapacke64_.so \
712              %{_libdir}/libopenblas64_.so 40 \
713    --slave   %{_libdir}/pkgconfig/lapacke64.pc lapacke64.pc \
714              %{_libdir}/%{name}/lapacke64.pc
715/sbin/ldconfig
716
717%preun -n %{name}64-devel
718if [ "$1" = "0" ]
719then
720    update-alternatives \
721        --remove libblas64_.so %{_libdir}/libopenblas64_.so
722    update-alternatives \
723        --remove liblapack64_.so %{_libdir}/libopenblas64_.so
724    update-alternatives \
725        --remove liblapacke64_.so %{_libdir}/libopenblas64_.so
726fi
727
728%postun -n %{name}64-devel -p /sbin/ldconfig
729%endif
730
731
732%post static
733update-alternatives \
734    --install %{_libdir}/libblas.a libblas.a \
735              %{_libdir}/libopenblas.a 40 \
736    --slave   %{_libdir}/libcblas.a libcblas.a \
737              %{_libdir}/libopenblas.a
738update-alternatives \
739    --install %{_libdir}/liblapack.a liblapack.a \
740              %{_libdir}/libopenblas.a 40 \
741    --slave   %{_libdir}/liblapacke.a liblapacke.a \
742              %{_libdir}/libopenblas.a
743
744%preun static
745if [ "$1" = "0" ]
746then
747    update-alternatives \
748        --remove libblas.a %{_libdir}/libopenblas.a
749    update-alternatives \
750        --remove liblapack.a %{_libdir}/libopenblas.a
751fi
752
753
754%if %build64
755%post -n %{name}64-static
756update-alternatives \
757    --install %{_libdir}/libblas64_.a libblas64_.a \
758              %{_libdir}/libopenblas64_.a 40 \
759    --slave   %{_libdir}/libcblas64_.a libcblas64_.a \
760              %{_libdir}/libopenblas64_.a
761update-alternatives \
762    --install %{_libdir}/liblapack64_.a liblapack64_.a \
763              %{_libdir}/libopenblas64_.a 40
764update-alternatives \
765    --install %{_libdir}/liblapacke64_.a liblapacke64_.a \
766              %{_libdir}/libopenblas64_.a 40
767
768%preun -n %{name}64-static
769if [ "$1" = "0" ]
770then
771    update-alternatives \
772        --remove libblas64_.a %{_libdir}/libopenblas64_.a
773    update-alternatives \
774        --remove liblapack64_.a %{_libdir}/libopenblas64_.a
775    update-alternatives \
776        --remove liblapacke64_.a %{_libdir}/libopenblas64_.a
777fi
778%endif
779
780
781%post Rblas -p /sbin/ldconfig
782%postun Rblas -p /sbin/ldconfig
783
784
785%clean
786rm -rf %{buildroot}
787
788
789%files
790%doc serial/Changelog.txt serial/GotoBLAS* serial/LICENSE
791%{_libdir}/lib%{name}-*.so
792%{_libdir}/lib%{name}.so.*
793
794%files openmp
795%doc openmp/Changelog.txt openmp/GotoBLAS* openmp/LICENSE
796%{_libdir}/lib%{name}o-*.so
797%{_libdir}/lib%{name}o.so.*
798
799%files threads
800%doc threaded/Changelog.txt threaded/GotoBLAS* threaded/LICENSE
801%{_libdir}/lib%{name}p-*.so
802%{_libdir}/lib%{name}p.so.*
803
804%if %build64
805%files serial64
806%doc serial64/Changelog.txt serial64/GotoBLAS* serial64/LICENSE
807%{_libdir}/lib%{name}64-*.so
808%{_libdir}/lib%{name}64.so.*
809
810%files serial64_
811%doc serial64_/Changelog.txt serial64_/GotoBLAS* serial64_/LICENSE
812%{_libdir}/lib%{name}64_-*.so
813%{_libdir}/lib%{name}64_.so.*
814
815%files openmp64
816%doc openmp64/Changelog.txt openmp64/GotoBLAS* openmp64/LICENSE
817%{_libdir}/lib%{name}o64-*.so
818%{_libdir}/lib%{name}o64.so.*
819
820%files openmp64_
821%doc openmp64_/Changelog.txt openmp64_/GotoBLAS* openmp64_/LICENSE
822%{_libdir}/lib%{name}o64_-*.so
823%{_libdir}/lib%{name}o64_.so.*
824
825%files threads64
826%doc threaded64/Changelog.txt threaded64/GotoBLAS* threaded64/LICENSE
827%{_libdir}/lib%{name}p64-*.so
828%{_libdir}/lib%{name}p64.so.*
829
830%files threads64_
831%doc threaded64_/Changelog.txt threaded64_/GotoBLAS* threaded64_/LICENSE
832%{_libdir}/lib%{name}p64_-*.so
833%{_libdir}/lib%{name}p64_.so.*
834%endif
835
836%files Rblas
837%dir %{_libdir}/R/lib
838%{_libdir}/R/lib/libRblas.so
839
840%files devel
841%{_includedir}/%{name}/
842%{_libdir}/lib%{name}.so
843%{_libdir}/lib%{name}o.so
844%{_libdir}/lib%{name}p.so
845%{_libdir}/pkgconfig/openblas.pc
846%{_libdir}/pkgconfig/openblaso.pc
847%{_libdir}/pkgconfig/openblasp.pc
848%dir %{_libdir}/%{name}
849%{_libdir}/%{name}/blas.pc
850%{_libdir}/%{name}/cblas.pc
851%{_libdir}/%{name}/lapack.pc
852%{_libdir}/%{name}/lapacke.pc
853
854%files static
855%{_libdir}/lib%{name}.a
856%{_libdir}/lib%{name}o.a
857%{_libdir}/lib%{name}p.a
858
859%if %build64
860%files -n %{name}64-devel
861%{_libdir}/lib%{name}64.so
862%{_libdir}/lib%{name}o64.so
863%{_libdir}/lib%{name}p64.so
864%{_libdir}/lib%{name}64_.so
865%{_libdir}/lib%{name}o64_.so
866%{_libdir}/lib%{name}p64_.so
867%{_libdir}/pkgconfig/*64.pc
868%{_libdir}/pkgconfig/*64_.pc
869%dir %{_libdir}/%{name}
870%{_libdir}/%{name}/*64*.pc
871
872%files -n %{name}64-static
873%{_libdir}/lib%{name}64.a
874%{_libdir}/lib%{name}o64.a
875%{_libdir}/lib%{name}p64.a
876%{_libdir}/lib%{name}64_.a
877%{_libdir}/lib%{name}o64_.a
878%{_libdir}/lib%{name}p64_.a
879%endif
880
881
882%changelog
883* Sun Feb 28 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.3.13-1
884- new upstream release.
885
886* Mon Oct 14 2019 Toshiaki Ara <ara_t@384.jp> 0.3.7-1
887- update to 0.3.7
888
889* Fri Jan 25 2019 Toshiaki Ara <ara_t@384.jp> 0.3.3-2
890- rebuild with gfortran-8.2.0
891
892* Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 0.3.3-1
893- update to 0.3.3
894- drop Patch2 and 3
895
896* Mon Jul 02 2018 Toshiaki Ara <ara_t@384.jp> 0.2.20-2
897- divide subpackages: openblas64-devel openblas64-static
898- fix wrong Provides
899
900* Wed Jun 27 2018 Toshiaki Ara <ara_t@384.jp> 0.2.20-1
901- initial build for Vine Linux (only x86_64 and %%{ix86})
902
Note: See TracBrowser for help on using the repository browser.