]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build | |
3 | %bcond_without tcl # disable tcl support | |
4 | %bcond_without tests # do not run "make check" | |
5 | # | |
6 | # NOTE: | |
7 | # - /etc/localtime must be present for tests to work | |
8 | # | |
9 | # TODO: | |
10 | # - faulty build on i486 (test stats-Ex.R): | |
11 | # error in optim(init[mask], getLike, method = "L-BFGS-B", lower = rep(0, : | |
12 | # non-finite value supplied by optim | |
13 | # - script for rpm to autoprovides/autorequires R internals | |
14 | # | |
15 | %include /usr/lib/rpm/macros.perl | |
16 | Summary: A language for data analysis and graphics | |
17 | Summary(pl.UTF-8): Język do analizy danych oraz grafiki | |
18 | Name: R | |
19 | Version: 2.8.1 | |
20 | Release: 1.2 | |
21 | License: Mixed (distributable), mostly GPL | |
22 | Group: Development/Languages | |
23 | # CRAN master site: ftp://cran.r-project.org/pub/R/src/ | |
24 | Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz | |
25 | # Source0-md5: acd40621b8942a2464daa2f9cef3273d | |
26 | Source1: %{name}.desktop | |
27 | Patch0: %{name}-libicuuc.patch | |
28 | URL: http://www.r-project.org/ | |
29 | BuildRequires: autoconf | |
30 | BuildRequires: automake | |
31 | BuildRequires: blas-devel | |
32 | BuildRequires: bzip2-devel | |
33 | BuildRequires: cairo-devel | |
34 | BuildRequires: gcc-c++ | |
35 | BuildRequires: gcc-fortran | |
36 | BuildRequires: gettext-devel | |
37 | BuildRequires: lapack-devel >= 3.1.1-4 | |
38 | BuildRequires: libicu-devel | |
39 | BuildRequires: libjpeg-devel >= 6b | |
40 | BuildRequires: libpng-devel >= 1.0.5 | |
41 | BuildRequires: libstdc++-devel | |
42 | BuildRequires: libtool | |
43 | BuildRequires: libxml2-devel >= 2.6.26 | |
44 | BuildRequires: pango-devel | |
45 | BuildRequires: pcre-devel | |
46 | BuildRequires: perl-base >= 1:5.6 | |
47 | BuildRequires: readline-devel | |
48 | BuildRequires: rpm-perlprov | |
49 | %{?with_tcl:BuildRequires: tcl-devel} | |
50 | BuildRequires: tetex-dvips | |
51 | BuildRequires: tetex-latex | |
52 | BuildRequires: tetex-pdftex | |
53 | %{?with_tcl:BuildRequires: tk-devel} | |
54 | BuildRequires: xorg-lib-libX11-devel | |
55 | BuildRequires: xorg-lib-libXmu-devel | |
56 | BuildRequires: xorg-lib-libXt-devel | |
57 | BuildRequires: zip | |
58 | BuildRequires: zlib-devel >= 1.1.3 | |
59 | #Requires: lpr | |
60 | Requires(post): perl-base | |
61 | Requires(post): textutils | |
62 | Obsoletes: R-base | |
63 | Obsoletes: R-contrib | |
64 | Obsoletes: R-recommended | |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
66 | ||
67 | %description | |
68 | A system for statistical computation and graphics. R consists of a | |
69 | language plus a run-time environment with graphics, a debugger, access | |
70 | to certain system functions, and the ability to run programs stored in | |
71 | script files. | |
72 | ||
73 | The design of R has been heavily influenced by two existing languages: | |
74 | Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the | |
75 | resulting language is very similar in appearance to S, the underlying | |
76 | implementation and semantics are derived from Scheme. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | System do obliczeń statystycznych i grafiki. R składa się z języka | |
80 | oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do | |
81 | niektórych funkcji systemowych oraz możliwością uruchamiania programów | |
82 | zapisanych w skryptach. | |
83 | ||
84 | Język R był zainspirowany dwoma istniejącymi językami: S (Beckera, | |
85 | Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale | |
86 | implementacja i semantyka wywodzi się ze Scheme. | |
87 | ||
88 | %prep | |
89 | %setup -q | |
90 | %patch0 -p1 | |
91 | ||
92 | %build | |
93 | %{__aclocal} -I m4 | |
94 | %{__autoconf} | |
95 | %configure \ | |
96 | --enable-R-shlib \ | |
97 | --enable-linux-lfs \ | |
98 | --with-system-zlib \ | |
99 | --with-system-bzlib \ | |
100 | --with-system-pcre \ | |
101 | --with-libpng \ | |
102 | --with-jpeglib \ | |
103 | --with-blas \ | |
104 | --with-lapack \ | |
105 | --with-readline \ | |
106 | --with%{!?with_tcl:out}-tcltk \ | |
107 | --with-cairo \ | |
108 | --with-libpng \ | |
109 | --with-jpeglib \ | |
110 | --with-system-zlib \ | |
111 | --with-system-bzlib \ | |
112 | --with-system-pcre \ | |
113 | --with-iconv \ | |
114 | --with-ICU \ | |
115 | --with-x \ | |
116 | --with-recommended-packages | |
117 | ||
118 | %{__make} | |
119 | %if %{with tests} | |
120 | %{__make} check | |
121 | %endif | |
122 | %{__make} docs help pdf html info | |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir}} | |
127 | install -d $RPM_BUILD_ROOT%{perl_vendorlib}/{R,Text} | |
128 | ||
129 | %{__make} -j1 install \ | |
130 | DESTDIR=$RPM_BUILD_ROOT | |
131 | ||
132 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
133 | ||
134 | mv $RPM_BUILD_ROOT%{_libdir}/R/lib/libR*.so $RPM_BUILD_ROOT%{_libdir} | |
135 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R | |
136 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include | |
137 | ||
138 | (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/R/ | |
139 | for f in * ; do | |
140 | ln -s %{_libdir}/%{name}/share/perl/R/$f $RPM_BUILD_ROOT%{perl_vendorlib}/R/ | |
141 | done) | |
142 | (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/Text | |
143 | for f in * ; do | |
144 | ln -s %{_libdir}/%{name}/share/perl/Text/$f $RPM_BUILD_ROOT%{perl_vendorlib}/Text/ | |
145 | done) | |
146 | ||
147 | rm -r $RPM_BUILD_ROOT%{perl_vendorlib}/{Text,R} | |
148 | rm -r $RPM_BUILD_ROOT%{_libdir}/R/share/perl/{File,Text} | |
149 | mv $RPM_BUILD_ROOT%{_libdir}/R/share/perl/R $RPM_BUILD_ROOT%{perl_vendorlib} | |
150 | ||
151 | %clean | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | ||
154 | %post -p /sbin/ldconfig | |
155 | %postun -p /sbin/ldconfig | |
156 | ||
157 | %files | |
158 | %defattr(644,root,root,755) | |
159 | %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS} | |
160 | ||
161 | %{_mandir}/man1/R.1* | |
162 | %{_mandir}/man1/Rscript* | |
163 | %attr(755,root,root) %{_bindir}/R | |
164 | %attr(755,root,root) %{_bindir}/Rscript | |
165 | %dir %{_libdir}/R | |
166 | %attr(755,root,root) %{_libdir}/R/bin | |
167 | %attr(755,root,root) %{_libdir}/libR*.so | |
168 | %{_libdir}/R/etc | |
169 | %{_libdir}/R/include | |
170 | %{_includedir}/R | |
171 | %{_libdir}/R/share | |
172 | %{_libdir}/R/COPYING | |
173 | %{_libdir}/R/NEWS | |
174 | %{_libdir}/R/SVN-REVISION | |
175 | %dir %{_libdir}/R/library | |
176 | %{_libdir}/%{name}/library/R.css | |
177 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} | |
178 | %dir %{_libdir}/R/doc | |
179 | %{_libdir}/R/doc/[KRm]* | |
180 | %dir %{_libdir}/R/doc/html | |
181 | %{_libdir}/R/doc/html/*.css | |
182 | %{_libdir}/R/doc/html/[Ra-lr-u]*.html | |
183 | %{_libdir}/R/doc/html/packages-head*.html | |
184 | %{_libdir}/R/doc/html/*.jpg | |
185 | %dir %{_libdir}/R/doc/html/search | |
186 | %{_libdir}/R/doc/html/search/[A-Z]* | |
187 | %ghost %{_libdir}/R/doc/html/search/index.txt | |
188 | %ghost %{_libdir}/R/doc/html/packages.html | |
189 | %{_desktopdir}/*.desktop | |
190 | ||
191 | %{perl_vendorlib}/R | |
192 | ||
193 | %attr(755,root,root) %{_libdir}/%{name}/modules | |
194 | ||
195 | %{_libdir}/%{name}/library/KernSmooth | |
196 | %{_libdir}/%{name}/library/MASS | |
197 | %{_libdir}/%{name}/library/base | |
198 | %{_libdir}/%{name}/library/boot | |
199 | %{_libdir}/%{name}/library/class | |
200 | %{_libdir}/%{name}/library/cluster | |
201 | %{_libdir}/%{name}/library/codetools | |
202 | %{_libdir}/%{name}/library/datasets | |
203 | %{_libdir}/%{name}/library/foreign | |
204 | %{_libdir}/%{name}/library/grDevices | |
205 | %{_libdir}/%{name}/library/graphics | |
206 | %{_libdir}/%{name}/library/grid | |
207 | %{_libdir}/%{name}/library/lattice | |
208 | %{_libdir}/%{name}/library/methods | |
209 | %{_libdir}/%{name}/library/mgcv | |
210 | %{_libdir}/%{name}/library/nlme | |
211 | %{_libdir}/%{name}/library/nnet | |
212 | %{_libdir}/%{name}/library/rpart | |
213 | %{_libdir}/%{name}/library/spatial | |
214 | %{_libdir}/%{name}/library/splines | |
215 | %{_libdir}/%{name}/library/stats | |
216 | %{_libdir}/%{name}/library/stats4 | |
217 | %{_libdir}/%{name}/library/survival | |
218 | %{_libdir}/%{name}/library/tcltk | |
219 | %{_libdir}/%{name}/library/tools | |
220 | %{_libdir}/%{name}/library/utils | |
221 | ||
222 | %{_pkgconfigdir}/*.pc |