1 |
ahmad |
33319 |
%define libname %mklibname Rmath |
2 |
|
|
# (tpg) really not needed |
3 |
|
|
# for private copy in /usr/lib/R/share/perl/Text/DelimMatch.pm |
4 |
|
|
%define _provides_exceptions KernSmooth.so\\|MASS.so\\|R_X11.so\\|class.so\\|cluster.so\\|foreign.so\\|grDevices.so\\|grid.so\\|internet.so\\|lapack.so\\|lattice.so\\|libRblas.so\\|libRlapack.so\\|methods.so\\|mgcv.so\\|nlme.so\\|nnet.so\\|rpart.so\\|spatial.so\\|splines.so\\|stats.so\\|survival.so\\|tcltk.so\\|tools.so\\|vfonts.so\\|perl\(R::.*\) |
5 |
|
|
%define _requires_exceptions libRblas.so\\|libRlapack.so\\|perl\(R::.*\) |
6 |
|
|
|
7 |
|
|
%define _disable_ld_no_undefined 1 |
8 |
|
|
|
9 |
|
|
%ifarch %mips %arm |
10 |
|
|
%define use_java 0 |
11 |
|
|
%else |
12 |
|
|
%define use_java 1 |
13 |
|
|
%endif |
14 |
|
|
|
15 |
|
|
Summary: A language for data analysis and graphics |
16 |
|
|
Name: R-base |
17 |
lmenut |
284221 |
Version: 2.15.1 |
18 |
fwang |
314784 |
Release: %mkrel 2 |
19 |
ahmad |
33319 |
License: GPLv2+ |
20 |
|
|
Group: Sciences/Mathematics |
21 |
|
|
URL: http://www.r-project.org |
22 |
|
|
Source0: http://cran.r-project.org/src/base/R-2/R-%{version}.tar.gz |
23 |
|
|
Source1: R-icons-png.tar.bz2 |
24 |
fwang |
157612 |
Source2: R.bash_completion |
25 |
lmenut |
87267 |
Patch0: R-2.8.1-menu.patch |
26 |
|
|
Patch1: R-2.13.0-disable-optimized-BLAS-test.patch |
27 |
ahmad |
33319 |
Patch5: R-2.10.1-gfxdemos.patch |
28 |
|
|
BuildRequires: pth-devel |
29 |
|
|
BuildRequires: glibc-static-devel |
30 |
|
|
BuildRequires: gcc-c++ |
31 |
|
|
BuildRequires: cups-common |
32 |
|
|
BuildRequires: bzip2-devel |
33 |
|
|
BuildRequires: gcc-gfortran |
34 |
lmenut |
185416 |
BuildRequires: quadmath-devel |
35 |
ahmad |
33319 |
BuildRequires: gpm-devel |
36 |
|
|
BuildRequires: ncurses-devel |
37 |
|
|
BuildRequires: readline-devel |
38 |
|
|
BuildRequires: tk-devel |
39 |
ahmad |
114998 |
BuildRequires: tcl |
40 |
ahmad |
33319 |
BuildRequires: tcl-devel |
41 |
|
|
BuildRequires: texinfo |
42 |
lmenut |
284221 |
BuildRequires: texinfo-tex |
43 |
lmenut |
185416 |
BuildRequires: texlive |
44 |
|
|
BuildRequires: texlive-fontsextra |
45 |
fwang |
147581 |
BuildRequires: libx11-devel |
46 |
|
|
BuildRequires: libxmu-devel |
47 |
|
|
BuildRequires: libxt-devel |
48 |
ahmad |
33319 |
BuildRequires: png-devel |
49 |
|
|
BuildRequires: jpeg-devel |
50 |
fwang |
157611 |
BuildRequires: pcre-devel |
51 |
ahmad |
33319 |
BuildRequires: bison |
52 |
|
|
BuildRequires: xdg-utils |
53 |
|
|
%if %{use_java} |
54 |
|
|
BuildRequires: java-rpmbuild |
55 |
|
|
%endif |
56 |
|
|
BuildRequires: paper-utils |
57 |
|
|
BuildRequires: cairo-devel |
58 |
|
|
BuildRequires: pango-devel |
59 |
|
|
BuildRequires: libtiff-devel |
60 |
|
|
BuildRequires: zip |
61 |
|
|
BuildRequires: lapack-devel |
62 |
|
|
BuildRequires: blas-devel |
63 |
|
|
BuildRequires: gcc-objc |
64 |
|
|
BuildRequires: gcc-objc++ |
65 |
|
|
BuildRequires: imake |
66 |
|
|
BuildRequires: gettext-devel |
67 |
|
|
BuildRequires: glibc-static-devel |
68 |
|
|
BuildRequires: pth-devel |
69 |
|
|
#BuildRequires: gnustep-make |
70 |
|
|
#BuildRequires: libgnustep-base-devel |
71 |
|
|
#BuildRequires: gnustep-base |
72 |
|
|
BuildRequires: lzma-devel |
73 |
|
|
BuildRequires: icu-devel |
74 |
|
|
BuildRequires: paper-utils |
75 |
|
|
Requires: tcl |
76 |
|
|
Requires: tk |
77 |
|
|
Requires: perl |
78 |
|
|
Requires: sed |
79 |
|
|
Requires: x11-font-adobe-100dpi |
80 |
|
|
Provides: R |
81 |
|
|
Obsoletes: R-recommended <= 1.5.1 |
82 |
|
|
Provides: R-recommended |
83 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
84 |
|
|
|
85 |
|
|
%description |
86 |
|
|
`GNU S' - A language and environment for statistical computing and |
87 |
|
|
graphics. R is similar to the S system, which was developed at Bell |
88 |
|
|
Laboratories by John Chambers et al. It provides a wide variety of |
89 |
|
|
statistical and graphical techniques (linear and nonlinear modelling, |
90 |
|
|
statistical tests, time series analysis, classification, clustering, ...). |
91 |
|
|
|
92 |
|
|
R is designed as a true computer language with control-flow |
93 |
|
|
constructions for iteration and alternation, and it allows users to |
94 |
|
|
add additional functionality by defining new functions. For |
95 |
|
|
computationally intensive tasks, C, C++ and Fortran code can be linked |
96 |
|
|
and called at run time. |
97 |
|
|
|
98 |
|
|
%package -n %{libname} |
99 |
|
|
Summary: Standalone math library from the R project |
100 |
|
|
Group: Development/Other |
101 |
|
|
|
102 |
|
|
%description -n %{libname} |
103 |
|
|
A standalone library of mathematical and statistical functions derived |
104 |
|
|
from the R project. This packages provides the shared libRmath library. |
105 |
|
|
|
106 |
|
|
%package -n %{libname}-devel |
107 |
|
|
Summary: Standalone math library from the R project |
108 |
|
|
Group: Development/Other |
109 |
|
|
Provides: libRmath-devel = %{version}-%{release} |
110 |
|
|
Requires: %{libname} = %{version}-%{release} |
111 |
|
|
|
112 |
|
|
%description -n %{libname}-devel |
113 |
|
|
A standalone library of mathematical and statistical functions derived |
114 |
|
|
from the R project. This packages provides the static libRmath library |
115 |
|
|
and header files. |
116 |
|
|
|
117 |
|
|
%prep |
118 |
|
|
%setup -qn R-%{version} |
119 |
|
|
%patch0 -p1 |
120 |
lmenut |
87267 |
%patch1 -p1 |
121 |
ahmad |
33319 |
%patch5 -p1 |
122 |
|
|
|
123 |
|
|
#rm -f acinclude.m4 |
124 |
|
|
aclocal -I ./m4 |
125 |
|
|
autoconf --force |
126 |
|
|
#autoreconf -fiv |
127 |
|
|
|
128 |
|
|
%build |
129 |
|
|
export R_BROWSER="$(type -p xdg-open)" |
130 |
|
|
export R_PDFVIEWER="$(type -p xdg-open)" |
131 |
|
|
export R_PRINTCMD="lpr" |
132 |
|
|
|
133 |
|
|
# (tpg) try to not build with -ffast-math |
134 |
|
|
export CFLAGS=$(echo "%{optflags}" | sed -e s/-ffast-math/-fno-fast-math/g ) |
135 |
|
|
export CFLAGS="%{optflags}" |
136 |
|
|
export FFLAGS=$CFLAGS |
137 |
|
|
export CXXFLAGS=$CFLAGS |
138 |
|
|
export FCFLAGS=$CFLAGS |
139 |
|
|
export OBJCFLAGS=$CFLAGS |
140 |
|
|
export F77="gfortran" |
141 |
|
|
%if %{use_java} |
142 |
|
|
export JAVA_HOME="%{java_home}" |
143 |
|
|
%endif |
144 |
|
|
export FPICFLAGS=-fPIC |
145 |
|
|
unset DISPLAY |
146 |
|
|
|
147 |
|
|
%configure2_5x \ |
148 |
|
|
--with-tcltk \ |
149 |
|
|
--with-tcl-config=%{_libdir}/tclConfig.sh \ |
150 |
|
|
--with-tk-config=%{_libdir}/tkConfig.sh \ |
151 |
|
|
--with-cairo \ |
152 |
|
|
--with-libpng \ |
153 |
|
|
--with-jpeglib \ |
154 |
|
|
--with-system-zlib \ |
155 |
|
|
--with-system-bzlib \ |
156 |
fwang |
157611 |
--with-system-pcre \ |
157 |
ahmad |
33319 |
--with-system-xz \ |
158 |
|
|
--with-ICU \ |
159 |
|
|
--with-readline \ |
160 |
|
|
--disable-BLAS-shlib \ |
161 |
|
|
--with-lapack=%{_libdir} \ |
162 |
|
|
--with-blas=%{_libdir} \ |
163 |
|
|
--enable-threads=pth \ |
164 |
|
|
--enable-R-profiling \ |
165 |
|
|
--enable-R-shlib |
166 |
|
|
|
167 |
fwang |
157613 |
make |
168 |
ahmad |
33319 |
|
169 |
|
|
pushd src/nmath/standalone |
170 |
|
|
make |
171 |
|
|
popd |
172 |
|
|
|
173 |
|
|
%make pdf |
174 |
|
|
%make info |
175 |
|
|
|
176 |
|
|
# DON'T comment "make check" below! If R doesn't pass the 'check' test |
177 |
|
|
# then it is probably badly compiled, or there are problems with |
178 |
|
|
# the compiler. |
179 |
lmenut |
87267 |
%check |
180 |
|
|
make check |
181 |
ahmad |
33319 |
|
182 |
|
|
|
183 |
|
|
%install |
184 |
|
|
rm -rf %{buildroot} |
185 |
|
|
|
186 |
ahmad |
114998 |
# N.B. don't use %%makeinstall because it sets prefix= which breaks Rscript |
187 |
|
|
# mga#1434 |
188 |
|
|
%makeinstall_std install-info |
189 |
ahmad |
33319 |
|
190 |
|
|
pushd src/nmath/standalone |
191 |
|
|
%makeinstall \ |
192 |
|
|
includedir=%{buildroot}%{_includedir} \ |
193 |
|
|
libdir=%{buildroot}%{_libdir} |
194 |
|
|
popd |
195 |
|
|
|
196 |
|
|
mv doc/manual/*.pdf $RPM_BUILD_DIR/R-%{version} || : |
197 |
|
|
# Add soft links (useful for TK gui) |
198 |
|
|
for i in R-admin R-data refman R-exts R-FAQ R-intro R-lang; do |
199 |
|
|
ln -s %{_datadir}/doc/R-base/${i}.pdf %{buildroot}%{_libdir}/R/doc/manual/${i}.pdf |
200 |
|
|
done |
201 |
|
|
|
202 |
|
|
# Remove latex versions of help pages |
203 |
|
|
# |
204 |
|
|
rm -rf %{buildroot}%{_libdir}/R/library/*/latex/ |
205 |
|
|
|
206 |
|
|
# Get rid of buildroot in script |
207 |
|
|
for i in %{buildroot}%{_libdir}/R/bin/R %{buildroot}%{_bindir}/R %{buildroot}%{_libdir}/pkgconfig/libR*.pc; |
208 |
|
|
do |
209 |
|
|
sed -i "s|%{buildroot}||g" $i; |
210 |
|
|
done |
211 |
|
|
|
212 |
|
|
# Remove package indices. They are rebuilt by the postinstall script. |
213 |
|
|
# |
214 |
|
|
rm -f %{buildroot}%{_libdir}/R/doc/html/function.html |
215 |
|
|
rm -f %{buildroot}%{_libdir}/R/doc/html/packages.html |
216 |
|
|
rm -f %{buildroot}%{_libdir}/R/doc/html/search/index.txt |
217 |
|
|
|
218 |
|
|
# Fix permissions |
219 |
|
|
chmod 644 %{buildroot}%{_libdir}/R/library/MASS/scripts/* |
220 |
|
|
chmod 755 %{buildroot}%{_libdir}/R/share/sh/echo.sh |
221 |
|
|
|
222 |
|
|
mkdir -p %{buildroot}%{_datadir}/applications |
223 |
ahmad |
33474 |
cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop <<EOF |
224 |
ahmad |
33319 |
[Desktop Entry] |
225 |
|
|
Name=R |
226 |
|
|
Comment=A language for statistical computing |
227 |
|
|
Exec=%{_bindir}/R --gui=tk |
228 |
|
|
Terminal=true |
229 |
|
|
Type=Application |
230 |
|
|
Icon=Rlogo |
231 |
|
|
Categories=Science;Math; |
232 |
|
|
EOF |
233 |
|
|
|
234 |
|
|
# icons |
235 |
|
|
mkdir -p %{buildroot}%{_iconsdir} |
236 |
|
|
tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir} |
237 |
|
|
|
238 |
|
|
# remove unpackaged files |
239 |
|
|
rm -f %{buildroot}%{_infodir}/dir{,.old*} |
240 |
|
|
|
241 |
|
|
# remove private perl libraries |
242 |
|
|
rm -rf %{buildroot}%{_libdir}/R/share/perl/File |
243 |
|
|
rm -rf %{buildroot}%{_libdir}/R/share/perl/Text |
244 |
|
|
|
245 |
|
|
# (tpg) add bash completion file |
246 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d |
247 |
fwang |
157612 |
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/bash_completion.d/R-base |
248 |
ahmad |
33319 |
|
249 |
|
|
%find_lang %{name} |
250 |
|
|
|
251 |
|
|
|
252 |
|
|
%post |
253 |
|
|
%_install_info R-admin.info |
254 |
|
|
%_install_info R-data.info |
255 |
|
|
%_install_info R-exts.info |
256 |
|
|
%_install_info R-FAQ.info |
257 |
|
|
%_install_info R-intro.info |
258 |
|
|
%_install_info R-lang.info |
259 |
|
|
|
260 |
|
|
%preun |
261 |
|
|
if [ $1 = 0 ]; then |
262 |
|
|
%_remove_install_info R-admin.info |
263 |
|
|
%_remove_install_info R-data.info |
264 |
|
|
%_remove_install_info R-exts.info |
265 |
|
|
%_remove_install_info R-FAQ.info |
266 |
|
|
%_remove_install_info R-intro.info |
267 |
|
|
%_remove_install_info R-lang.info |
268 |
|
|
fi |
269 |
|
|
|
270 |
|
|
%files -f %{name}.lang |
271 |
|
|
%doc README VERSION NEWS |
272 |
|
|
%doc R-admin.pdf R-data.pdf R-exts.pdf R-FAQ.pdf R-intro.pdf R-lang.pdf refman.pdf |
273 |
|
|
%{_sysconfdir}/bash_completion.d/* |
274 |
|
|
%{_bindir}/R |
275 |
|
|
%{_bindir}/Rscript |
276 |
|
|
%{_mandir}/*/* |
277 |
|
|
%{_libdir}/R |
278 |
|
|
%{_infodir}/*.info* |
279 |
|
|
%{_iconsdir}/*.* |
280 |
|
|
%{_liconsdir}/*.* |
281 |
|
|
%{_miconsdir}/*.* |
282 |
|
|
%{_datadir}/applications/*.desktop |
283 |
|
|
%{_libdir}/pkgconfig/libR.pc |
284 |
|
|
|
285 |
|
|
%files -n %{libname} |
286 |
|
|
%{_libdir}/libRmath.so |
287 |
|
|
|
288 |
|
|
%files -n %{libname}-devel |
289 |
|
|
%{_libdir}/libRmath.a |
290 |
|
|
%{_includedir}/Rmath.h |
291 |
|
|
%{_libdir}/pkgconfig/libRmath.pc |