]> git.pld-linux.org Git - packages/atlas.git/blame - atlas.spec
- unified %clean section
[packages/atlas.git] / atlas.spec
CommitLineData
4fa18fd8
AM
1# TODO:
2# - missing BR/R?
3# - disable altivec/3dnow autodetection - force values from spec
4# - fix for other arches
5# - deal with -fPIC to get shared libs
aee2a9a0 6Summary: The atlas libraries for numerical linear algebra
b5b9db59 7Summary(pl.UTF-8): Biblioteki numeryczne atlas do algebry liniowej
aee2a9a0
AM
8Name: atlas
9Version: 3.7.10
4fa18fd8
AM
10Release: 0.1
11License: BSD
0de77b1a 12Group: Libraries
aee2a9a0
AM
13Source0: http://dl.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
14# Source0-md5: c24aa9f676122fe6331fa63dd88c4113
15URL: http://math-atlas.sourceforge.net/
4fa18fd8 16BuildRequires: expect
aee2a9a0
AM
17BuildRequires: gcc-g77
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21The ATLAS (Automatically Tuned Linear Algebra Software) project is an
22ongoing research effort focusing on applying empirical techniques in
23order to provide portable performance. At present, it provides C and
24Fortran77 interfaces to a portably efficient BLAS implementation, as
25well as a few routines from LAPACK.
26
02c089e2 27%description -l pl.UTF-8
0de77b1a 28Projekt ATLAS (Automatically Tuned Linear Algebra Software -
02c089e2
JR
29automatycznie dostrajane oprogramowanie do algebry liniowej) to próby
30badawcze skupiające się na stosowaniu technik empirycznych w celu
31zapewnienia przenośnej wydajności. Aktualnie dostarczane są interfejsy
32w C i Fortranie 77 do przenośnej, wydajnej implementacji BLAS, a także
0de77b1a
JB
33kilku procedur LAPACK.
34
aee2a9a0
AM
35%package devel
36Summary: atlas header files
b5b9db59 37Summary(pl.UTF-8): Pliki nagłówkowe atlas
aee2a9a0 38Group: Development/Libraries
0de77b1a 39Requires: %{name} = %{version}-%{release}
aee2a9a0
AM
40
41%description devel
42atlas header files.
43
02c089e2
JR
44%description devel -l pl.UTF-8
45Pliki nagłówkowe atlas.
aee2a9a0
AM
46
47%package static
48Summary: Static atlas libraries
b5b9db59 49Summary(pl.UTF-8): Biblioteki statyczne atlas
aee2a9a0 50Group: Development/Libraries
0de77b1a 51Requires: %{name}-devel = %{version}-%{release}
aee2a9a0
AM
52
53%description static
54Static atlas libraries.
55
02c089e2 56%description static -l pl.UTF-8
aee2a9a0
AM
57Biblioteki statyczne atlas.
58
aee2a9a0
AM
59%prep
60%setup -q -n ATLAS
61
62%build
63# make config CC=xlc_r
64cat > config.expect <<EOF
65log_file "config.expect.log"
66set finished 0
67set arch foo
68spawn ./xconfig
69while {\$finished == 0} {
70 set timeout 120
71 expect {
4fa18fd8
AM
72%ifarch %{x8664} sparc64
73 -nocase {Enter bit number \[2\]:} {send "2\n"}
74%endif
75 -nocase {Enter number at top left of screen} {send "25\n"}
aee2a9a0
AM
76 -nocase {Have you scoped the errata file\?} {send "y\n"}
77 -nocase {Are you ready to continue\?} {send "y\n"}
78 -nocase {Enter machine number \[2\]: } {send "1\n"}
79 -nocase {Are you using a cross-compiler\?} {send "n\n"}
80 -nocase {enable Posix threads support\?} {send "y\n"}
81 -nocase {use express setup\?} {send "y\n"}
82 -nocase -indices -re {Enter Architecture name \(ARCH\) \[(.*)\]}
4fa18fd8 83 {global arch; set arch \$expect_out(1,string); send "\$arch\n"}
aee2a9a0
AM
84 -nocase {overwrite it\?} {send "y\n"}
85 -nocase {Enter File creation delay in seconds}
86 {send "0\n"}
87 -nocase {Enter Top level ATLAS directory} {send "\n"}
88 -nocase {Enter Directory to build libraries in} {send "\n"}
89 -nocase {Enter f77 compiler} {send "\n"}
90 -nocase {Enter F77 Flags} {send "\n"}
91 -nocase {Enter F77 linker} {send "\n"}
92 -nocase {Enter F77 Link Flags} {send "\n"}
93 -nocase {Enter ANSI C compiler} {send "\n"}
94 -nocase {Enter C Flags \(CCFLAGS\)} {send "\n"}
95 -nocase {Enter C compiler for generated code} {send "\n"}
96 -nocase {Enter C FLAGS \(MMFLAGS\)} {send "\n"}
97 -nocase {Enter C Linker} {send "\n"}
98 -nocase {Enter C Link Flags} {send "\n"}
99 -nocase {Enter Archiver \[} {send "\n"}
100 -nocase {Enter Archiver flags} {send "\n"}
101 -nocase {Enter Ranlib} {send "\n"}
102 -nocase {Enter BLAS library} {send "\n"}
103 -nocase {Enter General and system libs} {send "\n"}
104 -nocase {kill old subdirectories\?} {send "y\n"}
105 -nocase {Tune the Level 1 BLAS\?} {send "\n"}
106 -nocase {use supplied default values for install\?}
107 {send "y\n"}
108 -nocase {Configuration completed successfully} {set finished 1}
109 timeout {puts timeout; exit 1}
110 }
111}
112close
113#file copy -force CONFIG/ATLrun.\$arch CONFIG/ATLrun.Linux
114#file copy -force Make.\$arch Make.Linux
115exit
116EOF
4fa18fd8
AM
117%{__make} xconfig
118expect -f config.expect
119rm -f config.expect
120
121mksolib() {
122 #set -x
123 lib=$1
124 mode=$2
125 v=$3
126 so=$4
127 rm -f lib$lib.a
128 ar ruv lib$lib.a *.o
129 if [ -r *.lo ]; then
130 ar ruv lib$lib.a *.lo
131 fi
132 %{__cc} -shared -Wl,-soname,lib${lib}.so.${so} -Wl,--whole-archive -L. -l${lib} -Wl,--no-whole-archive -o lib${lib}.so.${v}
133 ln -s lib${lib}.so.${v} lib${lib}.so.${so}
134 ln -s lib${lib}.so.${v} lib${lib}.so
135 rm -f *.o *.lo
136}
137
138%ifarch %{x8664} sparc64
139OBJECT_MODE=64
140%else
141OBJECT_MODE=32
142%endif
143export OBJECT_MODE
144
145arch=$(ls -1 Make.Linux* | sed -e 's#^Make\.##g')
146
147%{__make} install \
148 CC="%{__cc}" \
149 arch=${arch}
150
151install -d lib/${arch}/shared
152cd lib/${arch}/shared
153libs="atlas cblas f77blas lapack tstatlas"
154
155for lib in `echo ${libs} | xargs`; do
156 case "$lib" in
157 "lapack")
158 lib=atllapack
159 ;;
160 "cblas")
161 lib=atlcblas
162 ;;
163 esac
164 echo $lib
165 ar x ../lib${lib}.a
166 mksolib ${lib} ${OBJECT_MODE} 1.1 1
0de77b1a
JB
167 mv *.so* ..
168 mv *.a ..
4fa18fd8 169done
0de77b1a 170cd ../../..
4fa18fd8 171rm -rf lib/${arch}/shared
aee2a9a0
AM
172
173%install
174rm -rf $RPM_BUILD_ROOT
175
4fa18fd8
AM
176arch=$(ls -1 Make.Linux* | sed -e 's#^Make\.##g')
177
178install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir}}
aee2a9a0 179
4fa18fd8 180libs="atlas cblas f77blas lapack tstatlas"
aee2a9a0 181
0de77b1a 182cd lib/${arch}
4fa18fd8
AM
183for lib in `echo ${libs} | xargs`; do
184 install lib${lib}.a $RPM_BUILD_ROOT%{_libdir}
185 install lib${lib}.so.1.1 $RPM_BUILD_ROOT%{_libdir}
186 ln -s lib${lib}.so.1.1 $RPM_BUILD_ROOT%{_libdir}/lib${lib}.so
aee2a9a0 187done
0de77b1a 188cd ../..
4fa18fd8
AM
189
190cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
aee2a9a0 191
aee2a9a0
AM
192
193%clean
79a8ca71 194rm -rf $RPM_BUILD_ROOT
aee2a9a0
AM
195
196%post -p /sbin/ldconfig
197%postun -p /sbin/ldconfig
198
aee2a9a0
AM
199%files
200%defattr(644,root,root,755)
4fa18fd8
AM
201%doc doc/*
202%attr(755,root,root) %{_libdir}/lib*.so.*
aee2a9a0 203
4fa18fd8 204%files devel
aee2a9a0 205%defattr(644,root,root,755)
4fa18fd8
AM
206%attr(755,root,root) %{_libdir}/lib*.so
207%{_includedir}/%{name}
aee2a9a0
AM
208
209%files static
210%defattr(644,root,root,755)
4fa18fd8 211%{_libdir}/lib*.a
This page took 0.103816 seconds and 4 git commands to generate.