]> git.pld-linux.org Git - packages/atlas.git/blob - atlas.spec
- tabs in preamble
[packages/atlas.git] / atlas.spec
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
6 Summary:        The atlas libraries for numerical linear algebra
7 Summary(pl.UTF-8):      Biblioteki numeryczne atlas do algebry liniowej
8 Name:           atlas
9 Version:        3.7.10
10 Release:        0.1
11 License:        BSD
12 Group:          Libraries
13 Source0:        http://dl.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
14 # Source0-md5:  c24aa9f676122fe6331fa63dd88c4113
15 URL:            http://math-atlas.sourceforge.net/
16 BuildRequires:  expect
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
27 %description -l pl.UTF-8
28 Projekt ATLAS (Automatically Tuned Linear Algebra Software -
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
33 kilku procedur LAPACK.
34
35 %package devel
36 Summary:        atlas header files
37 Summary(pl.UTF-8):      Pliki nagłówkowe atlas
38 Group:          Development/Libraries
39 Requires:       %{name} = %{version}-%{release}
40
41 %description devel
42 atlas header files.
43
44 %description devel -l pl.UTF-8
45 Pliki nagłówkowe atlas.
46
47 %package static
48 Summary:        Static atlas libraries
49 Summary(pl.UTF-8):      Biblioteki statyczne atlas
50 Group:          Development/Libraries
51 Requires:       %{name}-devel = %{version}-%{release}
52
53 %description static
54 Static atlas libraries.
55
56 %description static -l pl.UTF-8
57 Biblioteki statyczne atlas.
58
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 {
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"}
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\) \[(.*)\]}
83      {global arch; set arch \$expect_out(1,string); send "\$arch\n"}
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
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
167         mv *.so* ..
168         mv *.a ..
169 done
170 cd ../../..
171 rm -rf lib/${arch}/shared
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175
176 arch=$(ls -1 Make.Linux* | sed -e 's#^Make\.##g')
177
178 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir}}
179
180 libs="atlas cblas f77blas lapack tstatlas"
181
182 cd lib/${arch}
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
187 done
188 cd ../..
189
190 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
191
192
193 %clean
194 rm -fr $RPM_BUILD_ROOT
195
196 %post   -p /sbin/ldconfig
197 %postun -p /sbin/ldconfig
198
199 %files
200 %defattr(644,root,root,755)
201 %doc doc/*
202 %attr(755,root,root) %{_libdir}/lib*.so.*
203
204 %files devel
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_libdir}/lib*.so
207 %{_includedir}/%{name}
208
209 %files static
210 %defattr(644,root,root,755)
211 %{_libdir}/lib*.a
This page took 0.073882 seconds and 3 git commands to generate.