]>
Commit | Line | Data |
---|---|---|
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 | 6 | Summary: The atlas libraries for numerical linear algebra |
b5b9db59 | 7 | Summary(pl.UTF-8): Biblioteki numeryczne atlas do algebry liniowej |
aee2a9a0 AM |
8 | Name: atlas |
9 | Version: 3.7.10 | |
4fa18fd8 AM |
10 | Release: 0.1 |
11 | License: BSD | |
0de77b1a | 12 | Group: Libraries |
aee2a9a0 AM |
13 | Source0: http://dl.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2 |
14 | # Source0-md5: c24aa9f676122fe6331fa63dd88c4113 | |
15 | URL: http://math-atlas.sourceforge.net/ | |
4fa18fd8 | 16 | BuildRequires: expect |
aee2a9a0 AM |
17 | BuildRequires: gcc-g77 |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | The ATLAS (Automatically Tuned Linear Algebra Software) project is an | |
22 | ongoing research effort focusing on applying empirical techniques in | |
23 | order to provide portable performance. At present, it provides C and | |
24 | Fortran77 interfaces to a portably efficient BLAS implementation, as | |
25 | well as a few routines from LAPACK. | |
26 | ||
02c089e2 | 27 | %description -l pl.UTF-8 |
0de77b1a | 28 | Projekt ATLAS (Automatically Tuned Linear Algebra Software - |
02c089e2 JR |
29 | automatycznie dostrajane oprogramowanie do algebry liniowej) to próby |
30 | badawcze skupiające się na stosowaniu technik empirycznych w celu | |
31 | zapewnienia przenośnej wydajności. Aktualnie dostarczane są interfejsy | |
32 | w C i Fortranie 77 do przenośnej, wydajnej implementacji BLAS, a także | |
0de77b1a JB |
33 | kilku procedur LAPACK. |
34 | ||
aee2a9a0 AM |
35 | %package devel |
36 | Summary: atlas header files | |
b5b9db59 | 37 | Summary(pl.UTF-8): Pliki nagłówkowe atlas |
aee2a9a0 | 38 | Group: Development/Libraries |
0de77b1a | 39 | Requires: %{name} = %{version}-%{release} |
aee2a9a0 AM |
40 | |
41 | %description devel | |
42 | atlas header files. | |
43 | ||
02c089e2 JR |
44 | %description devel -l pl.UTF-8 |
45 | Pliki nagłówkowe atlas. | |
aee2a9a0 AM |
46 | |
47 | %package static | |
48 | Summary: Static atlas libraries | |
b5b9db59 | 49 | Summary(pl.UTF-8): Biblioteki statyczne atlas |
aee2a9a0 | 50 | Group: Development/Libraries |
0de77b1a | 51 | Requires: %{name}-devel = %{version}-%{release} |
aee2a9a0 AM |
52 | |
53 | %description static | |
54 | Static atlas libraries. | |
55 | ||
02c089e2 | 56 | %description static -l pl.UTF-8 |
aee2a9a0 AM |
57 | Biblioteki statyczne atlas. |
58 | ||
aee2a9a0 AM |
59 | %prep |
60 | %setup -q -n ATLAS | |
61 | ||
62 | %build | |
63 | # make config CC=xlc_r | |
64 | cat > config.expect <<EOF | |
65 | log_file "config.expect.log" | |
66 | set finished 0 | |
67 | set arch foo | |
68 | spawn ./xconfig | |
69 | while {\$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 | } | |
112 | close | |
113 | #file copy -force CONFIG/ATLrun.\$arch CONFIG/ATLrun.Linux | |
114 | #file copy -force Make.\$arch Make.Linux | |
115 | exit | |
116 | EOF | |
4fa18fd8 AM |
117 | %{__make} xconfig |
118 | expect -f config.expect | |
119 | rm -f config.expect | |
120 | ||
121 | mksolib() { | |
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 | |
139 | OBJECT_MODE=64 | |
140 | %else | |
141 | OBJECT_MODE=32 | |
142 | %endif | |
143 | export OBJECT_MODE | |
144 | ||
145 | arch=$(ls -1 Make.Linux* | sed -e 's#^Make\.##g') | |
146 | ||
147 | %{__make} install \ | |
148 | CC="%{__cc}" \ | |
149 | arch=${arch} | |
150 | ||
151 | install -d lib/${arch}/shared | |
152 | cd lib/${arch}/shared | |
153 | libs="atlas cblas f77blas lapack tstatlas" | |
154 | ||
155 | for 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 | 169 | done |
0de77b1a | 170 | cd ../../.. |
4fa18fd8 | 171 | rm -rf lib/${arch}/shared |
aee2a9a0 AM |
172 | |
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
4fa18fd8 AM |
176 | arch=$(ls -1 Make.Linux* | sed -e 's#^Make\.##g') |
177 | ||
178 | install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir}} | |
aee2a9a0 | 179 | |
4fa18fd8 | 180 | libs="atlas cblas f77blas lapack tstatlas" |
aee2a9a0 | 181 | |
0de77b1a | 182 | cd lib/${arch} |
4fa18fd8 AM |
183 | for 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 | 187 | done |
0de77b1a | 188 | cd ../.. |
4fa18fd8 AM |
189 | |
190 | cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name} | |
aee2a9a0 | 191 | |
aee2a9a0 AM |
192 | |
193 | %clean | |
79a8ca71 | 194 | rm -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 |