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

  ViewVC Help
Powered by ViewVC 1.1.30