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

  ViewVC Help
Powered by ViewVC 1.1.30