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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30