/[packages]/cauldron/R-base/current/SPECS/R-base.spec
ViewVC logotype

Contents of /cauldron/R-base/current/SPECS/R-base.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 381114 - (show annotations) (download)
Mon Jan 14 00:42:32 2013 UTC (7 years, 1 month ago) by lmenut
File size: 7890 byte(s)
SILENT make: limit to 8 the number of jobs to run simultaneously
1 %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 Version: 2.15.2
18 Release: %mkrel 3
19 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 Source2: R.bash_completion
25 Patch0: R-2.8.1-menu.patch
26 Patch1: R-2.13.0-disable-optimized-BLAS-test.patch
27 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 BuildRequires: quadmath-devel
35 BuildRequires: gpm-devel
36 BuildRequires: ncurses-devel
37 BuildRequires: readline-devel
38 BuildRequires: tk-devel
39 BuildRequires: tcl
40 BuildRequires: tcl-devel
41 BuildRequires: texinfo
42 BuildRequires: texinfo-tex
43 BuildRequires: texlive
44 BuildRequires: texlive-fontsextra
45 BuildRequires: libx11-devel
46 BuildRequires: libxmu-devel
47 BuildRequires: libxt-devel
48 BuildRequires: png-devel
49 BuildRequires: jpeg-devel
50 BuildRequires: pcre-devel
51 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
84 %description
85 `GNU S' - A language and environment for statistical computing and
86 graphics. R is similar to the S system, which was developed at Bell
87 Laboratories by John Chambers et al. It provides a wide variety of
88 statistical and graphical techniques (linear and nonlinear modelling,
89 statistical tests, time series analysis, classification, clustering, ...).
90
91 R is designed as a true computer language with control-flow
92 constructions for iteration and alternation, and it allows users to
93 add additional functionality by defining new functions. For
94 computationally intensive tasks, C, C++ and Fortran code can be linked
95 and called at run time.
96
97 %package -n %{libname}
98 Summary: Standalone math library from the R project
99 Group: Development/Other
100
101 %description -n %{libname}
102 A standalone library of mathematical and statistical functions derived
103 from the R project. This packages provides the shared libRmath library.
104
105 %package -n %{libname}-devel
106 Summary: Standalone math library from the R project
107 Group: Development/Other
108 Provides: libRmath-devel = %{version}-%{release}
109 Requires: %{libname} = %{version}-%{release}
110
111 %description -n %{libname}-devel
112 A standalone library of mathematical and statistical functions derived
113 from the R project. This packages provides the static libRmath library
114 and header files.
115
116 %prep
117 %setup -qn R-%{version}
118 %patch0 -p1
119 %patch1 -p1
120 %patch5 -p1
121
122 #rm -f acinclude.m4
123 aclocal -I ./m4
124 autoconf --force
125 #autoreconf -fiv
126
127 %build
128 export R_BROWSER="$(type -p xdg-open)"
129 export R_PDFVIEWER="$(type -p xdg-open)"
130 export R_PRINTCMD="lpr"
131
132 # (tpg) try to not build with -ffast-math
133 export CFLAGS=$(echo "%{optflags}" | sed -e s/-ffast-math/-fno-fast-math/g )
134 export CFLAGS="%{optflags}"
135 export FFLAGS=$CFLAGS
136 export CXXFLAGS=$CFLAGS
137 export FCFLAGS=$CFLAGS
138 export OBJCFLAGS=$CFLAGS
139 export F77="gfortran"
140 %if %{use_java}
141 export JAVA_HOME="%{java_home}"
142 %endif
143 export FPICFLAGS=-fPIC
144 unset DISPLAY
145
146 %configure2_5x \
147 --with-tcltk \
148 --with-tcl-config=%{_libdir}/tclConfig.sh \
149 --with-tk-config=%{_libdir}/tkConfig.sh \
150 --with-cairo \
151 --with-libpng \
152 --with-jpeglib \
153 --with-system-zlib \
154 --with-system-bzlib \
155 --with-system-pcre \
156 --with-system-xz \
157 --with-ICU \
158 --with-readline \
159 --disable-BLAS-shlib \
160 --with-lapack=%{_libdir} \
161 --with-blas=%{_libdir} \
162 --enable-threads=pth \
163 --enable-R-profiling \
164 --enable-R-shlib
165
166 make -j8
167
168 pushd src/nmath/standalone
169 make -j8
170 popd
171
172 %make pdf
173 %make info
174
175 # DON'T comment "make check" below! If R doesn't pass the 'check' test
176 # then it is probably badly compiled, or there are problems with
177 # the compiler.
178 %check
179 make check
180
181
182 %install
183 rm -rf %{buildroot}
184
185 # N.B. don't use %%makeinstall because it sets prefix= which breaks Rscript
186 # mga#1434
187 %makeinstall_std install-info
188
189 pushd src/nmath/standalone
190 %makeinstall \
191 includedir=%{buildroot}%{_includedir} \
192 libdir=%{buildroot}%{_libdir}
193 popd
194
195 mv doc/manual/*.pdf $RPM_BUILD_DIR/R-%{version} || :
196 # Add soft links (useful for TK gui)
197 for i in R-admin R-data refman R-exts R-FAQ R-intro R-lang; do
198 ln -s %{_datadir}/doc/R-base/${i}.pdf %{buildroot}%{_libdir}/R/doc/manual/${i}.pdf
199 done
200
201 # Remove latex versions of help pages
202 #
203 rm -rf %{buildroot}%{_libdir}/R/library/*/latex/
204
205 # Get rid of buildroot in script
206 for i in %{buildroot}%{_libdir}/R/bin/R %{buildroot}%{_bindir}/R %{buildroot}%{_libdir}/pkgconfig/libR*.pc;
207 do
208 sed -i "s|%{buildroot}||g" $i;
209 done
210
211 # Remove package indices. They are rebuilt by the postinstall script.
212 #
213 rm -f %{buildroot}%{_libdir}/R/doc/html/function.html
214 rm -f %{buildroot}%{_libdir}/R/doc/html/packages.html
215 rm -f %{buildroot}%{_libdir}/R/doc/html/search/index.txt
216
217 # Fix permissions
218 chmod 644 %{buildroot}%{_libdir}/R/library/MASS/scripts/*
219 chmod 755 %{buildroot}%{_libdir}/R/share/sh/echo.sh
220
221 mkdir -p %{buildroot}%{_datadir}/applications
222 cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop <<EOF
223 [Desktop Entry]
224 Name=R
225 Comment=A language for statistical computing
226 Exec=%{_bindir}/R --gui=tk
227 Terminal=true
228 Type=Application
229 Icon=Rlogo
230 Categories=Science;Math;
231 EOF
232
233 # icons
234 mkdir -p %{buildroot}%{_iconsdir}
235 tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir}
236
237 # remove unpackaged files
238 rm -f %{buildroot}%{_infodir}/dir{,.old*}
239
240 # remove private perl libraries
241 rm -rf %{buildroot}%{_libdir}/R/share/perl/File
242 rm -rf %{buildroot}%{_libdir}/R/share/perl/Text
243
244 # (tpg) add bash completion file
245 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
246 cp %{SOURCE2} %{buildroot}%{_sysconfdir}/bash_completion.d/R-base
247
248 %find_lang %{name}
249
250
251 %post
252 %_install_info R-admin.info
253 %_install_info R-data.info
254 %_install_info R-exts.info
255 %_install_info R-FAQ.info
256 %_install_info R-intro.info
257 %_install_info R-lang.info
258
259 %preun
260 if [ $1 = 0 ]; then
261 %_remove_install_info R-admin.info
262 %_remove_install_info R-data.info
263 %_remove_install_info R-exts.info
264 %_remove_install_info R-FAQ.info
265 %_remove_install_info R-intro.info
266 %_remove_install_info R-lang.info
267 fi
268
269 %files -f %{name}.lang
270 %doc README VERSION NEWS
271 %doc R-admin.pdf R-data.pdf R-exts.pdf R-FAQ.pdf R-intro.pdf R-lang.pdf refman.pdf
272 %{_sysconfdir}/bash_completion.d/*
273 %{_bindir}/R
274 %{_bindir}/Rscript
275 %{_mandir}/*/*
276 %{_libdir}/R
277 %{_infodir}/*.info*
278 %{_iconsdir}/*.*
279 %{_liconsdir}/*.*
280 %{_miconsdir}/*.*
281 %{_datadir}/applications/*.desktop
282 %{_libdir}/pkgconfig/libR.pc
283
284 %files -n %{libname}
285 %{_libdir}/libRmath.so
286
287 %files -n %{libname}-devel
288 %{_libdir}/libRmath.a
289 %{_includedir}/Rmath.h
290 %{_libdir}/pkgconfig/libRmath.pc

  ViewVC Help
Powered by ViewVC 1.1.26