]>
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.11.0 | |
20 | Release: 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: c6c1e866299f533617750889c729bfb3 | |
26 | Source1: %{name}.desktop | |
27 | URL: http://www.r-project.org/ | |
28 | BuildRequires: autoconf | |
29 | BuildRequires: automake | |
30 | BuildRequires: blas-devel | |
31 | BuildRequires: bzip2-devel | |
32 | BuildRequires: cairo-devel | |
33 | BuildRequires: gcc-c++ | |
34 | BuildRequires: gcc-fortran | |
35 | BuildRequires: gettext-devel | |
36 | BuildRequires: lapack-devel >= 3.1.1-4 | |
37 | BuildRequires: libicu-devel | |
38 | BuildRequires: libjpeg-devel >= 6b | |
39 | BuildRequires: libpng-devel >= 1.0.5 | |
40 | BuildRequires: libstdc++-devel | |
41 | BuildRequires: libtool | |
42 | BuildRequires: libxml2-devel >= 2.6.26 | |
43 | BuildRequires: pango-devel | |
44 | BuildRequires: pcre-devel | |
45 | BuildRequires: perl-base >= 1:5.6 | |
46 | BuildRequires: pkgconfig | |
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: xz-devel | |
58 | BuildRequires: zip | |
59 | BuildRequires: zlib-devel >= 1.1.3 | |
60 | #Requires: lpr | |
61 | Requires(post): perl-base | |
62 | Requires(post): textutils | |
63 | Suggests: rkward | |
64 | Obsoletes: R-base | |
65 | Obsoletes: R-contrib | |
66 | Obsoletes: R-recommended | |
67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
68 | ||
69 | %description | |
70 | A system for statistical computation and graphics. R consists of a | |
71 | language plus a run-time environment with graphics, a debugger, access | |
72 | to certain system functions, and the ability to run programs stored in | |
73 | script files. | |
74 | ||
75 | The design of R has been heavily influenced by two existing languages: | |
76 | Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the | |
77 | resulting language is very similar in appearance to S, the underlying | |
78 | implementation and semantics are derived from Scheme. | |
79 | ||
80 | %description -l pl.UTF-8 | |
81 | System do obliczeń statystycznych i grafiki. R składa się z języka | |
82 | oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do | |
83 | niektórych funkcji systemowych oraz możliwością uruchamiania programów | |
84 | zapisanych w skryptach. | |
85 | ||
86 | Język R był zainspirowany dwoma istniejącymi językami: S (Beckera, | |
87 | Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale | |
88 | implementacja i semantyka wywodzi się ze Scheme. | |
89 | ||
90 | %prep | |
91 | %setup -q | |
92 | ||
93 | %build | |
94 | %{__aclocal} -I m4 | |
95 | %{__autoconf} | |
96 | %configure \ | |
97 | --enable-R-shlib \ | |
98 | --enable-linux-lfs \ | |
99 | --with-system-zlib \ | |
100 | --with-system-bzlib \ | |
101 | --with-system-pcre \ | |
102 | --with-system-xz \ | |
103 | --with-libpng \ | |
104 | --with-jpeglib \ | |
105 | --with-blas \ | |
106 | --with-lapack \ | |
107 | --with-readline \ | |
108 | --with%{!?with_tcl:out}-tcltk \ | |
109 | --with-cairo \ | |
110 | --with-libpng \ | |
111 | --with-jpeglib \ | |
112 | --with-system-zlib \ | |
113 | --with-system-bzlib \ | |
114 | --with-system-pcre \ | |
115 | --with-iconv \ | |
116 | --with-ICU \ | |
117 | --with-x \ | |
118 | --with-recommended-packages | |
119 | ||
120 | %{__make} | |
121 | %if %{with tests} | |
122 | %{__make} check | |
123 | %endif | |
124 | %{__make} docs pdf info | |
125 | ||
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir}} | |
129 | install -d $RPM_BUILD_ROOT%{perl_vendorlib}/{R,Text} | |
130 | ||
131 | %{__make} -j1 install \ | |
132 | DESTDIR=$RPM_BUILD_ROOT | |
133 | ||
134 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
135 | ||
136 | mv $RPM_BUILD_ROOT%{_libdir}/R/lib/libR*.so $RPM_BUILD_ROOT%{_libdir} | |
137 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R | |
138 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include | |
139 | ||
140 | (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/R/ | |
141 | for f in * ; do | |
142 | ln -s %{_libdir}/%{name}/share/perl/R/$f $RPM_BUILD_ROOT%{perl_vendorlib}/R/ | |
143 | done) | |
144 | (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/Text | |
145 | for f in * ; do | |
146 | ln -s %{_libdir}/%{name}/share/perl/Text/$f $RPM_BUILD_ROOT%{perl_vendorlib}/Text/ | |
147 | done) | |
148 | ||
149 | rm -r $RPM_BUILD_ROOT%{perl_vendorlib}/R | |
150 | rm -r $RPM_BUILD_ROOT%{_libdir}/R/share/perl/File | |
151 | mv $RPM_BUILD_ROOT%{_libdir}/R/share/perl/R $RPM_BUILD_ROOT%{perl_vendorlib} | |
152 | ||
153 | %clean | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %post -p /sbin/ldconfig | |
157 | %postun -p /sbin/ldconfig | |
158 | ||
159 | %files | |
160 | %defattr(644,root,root,755) | |
161 | %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS} | |
162 | ||
163 | %{_mandir}/man1/R.1* | |
164 | %{_mandir}/man1/Rscript* | |
165 | %attr(755,root,root) %{_bindir}/R | |
166 | %attr(755,root,root) %{_bindir}/Rscript | |
167 | %dir %{_libdir}/R | |
168 | %attr(755,root,root) %{_libdir}/R/bin | |
169 | %attr(755,root,root) %{_libdir}/libR*.so | |
170 | %{_libdir}/R/etc | |
171 | %{_libdir}/R/include | |
172 | %{_includedir}/R | |
173 | %{_libdir}/R/share | |
174 | %{_libdir}/R/COPYING | |
175 | %{_libdir}/R/NEWS | |
176 | %{_libdir}/R/SVN-REVISION | |
177 | %dir %{_libdir}/R/library | |
178 | %{_libdir}/%{name}/library/R.css | |
179 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} | |
180 | %dir %{_libdir}/R/doc | |
181 | %{_libdir}/R/doc/[KRm]* | |
182 | %dir %{_libdir}/R/doc/html | |
183 | %{_libdir}/R/doc/html/*.css | |
184 | %{_libdir}/R/doc/html/[Ra-lr-u]*.html | |
185 | %{_libdir}/R/doc/html/packages-head*.html | |
186 | %{_libdir}/R/doc/html/*.jpg | |
187 | %ghost %{_libdir}/R/doc/html/packages.html | |
188 | %{_desktopdir}/*.desktop | |
189 | ||
190 | %{perl_vendorlib}/R | |
191 | ||
192 | %attr(755,root,root) %{_libdir}/%{name}/modules | |
193 | ||
194 | %{_libdir}/%{name}/library/KernSmooth | |
195 | %{_libdir}/%{name}/library/MASS | |
196 | %{_libdir}/%{name}/library/Matrix | |
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 |