Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > media > main-backports-src > by-pkgid > 46556fde9ace32111829a8d04f207783 > files > 3

R-base-2.6.1-4mdv2008.0.src.rpm

%define libname %mklibname Rmath
# (tpg) really not needed
# for private copy in /usr/lib/R/share/perl/Text/DelimMatch.pm 
%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\\|libR.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::.*\)
%define _requires_exceptions libR.so\\|libRblas.so\\|libRlapack.so\\|perl\(R::.*\)

Summary:	A language for data analysis and graphics
Name:		R-base
Version:	2.6.1
Release:	%mkrel 4
License:	GPLv2+
Group:		Sciences/Mathematics
URL:		http://www.r-project.org
Source0:	http://cran.r-project.org/src/base/R-2/R-%{version}.tar.bz2
Source1:        R-icons-png.tar.bz2
Patch0:         R-2.1.0-menu.patch
Provides:	R
Requires:	perl
Requires:	sed
BuildRequires:	cups-common
BuildRequires:	bzip2-devel
BuildRequires:	gcc-gfortran
BuildRequires:	gpm-devel
BuildRequires:  mozilla-firefox
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	tk-devel
Buildrequires:	tcl
BuildRequires:	tcl-devel
BuildRequires:	texinfo
BuildRequires:	tetex-latex
BuildRequires:  X11-devel
BuildRequires:	png-devel
BuildRequires:	jpeg-devel
BuildRequires:	pcre-devel
Requires:	tcl
Requires:	tk
Obsoletes:	R-recommended <= 1.5.1
Provides:	R-recommended
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description 
`GNU S' - A language and environment for statistical computing and
graphics. R is similar to the S system, which was developed at Bell
Laboratories by John Chambers et al. It provides a wide variety of
statistical and graphical techniques (linear and nonlinear modelling,
statistical tests, time series analysis, classification, clustering, ...).

R is designed as a true computer language with control-flow
constructions for iteration and alternation, and it allows users to
add additional functionality by defining new functions. For
computationally intensive tasks, C, C++ and Fortran code can be linked
and called at run time.

%package -n %{libname}
Summary:	Standalone math library from the R project
Group:		Development/Other

%description -n %{libname}
A standalone library of mathematical and statistical functions derived
from the R project.  This packages provides the shared libRmath library.

%package -n %{libname}-devel
Summary:	Standalone math library from the R project
Group:		Development/Other
Provides:	libRmath-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}

%description -n %{libname}-devel
A standalone library of mathematical and statistical functions derived
from the R project.  This packages provides the static libRmath library
and header files.

%prep
%setup -qn R-%{version}
%patch0 -p1

perl -pi -e "s/firefox/mozilla-firefox/" m4/R.m4 configure
rm -f acinclude.m4
aclocal -I ./m4
autoconf

%build
export R_PDFVIEWER="%{_bindir}/evince"
export R_PRINTCMD="lpr"
export R_BROWSER="%{_bindir}/mozilla-firefox"

echo 'R_LIBS=${R_LIBS-'"'%{_libdir}/R/lib'"'}' >> etc/Renviron.in
export CFLAGS=$(echo "%{optflags}") 
# | sed -e s/-ffast-math/-fno-fast-math/g )
export FFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
export F77="gfortran"
unset DISPLAY
FPICFLAGS=-fPIC \

%configure2_5x \
	--with-tcltk \
	--with-tcl-config=%{_libdir}/tclConfig.sh \
	--with-tk-config=%{_libdir}/tkConfig.sh \
	--enable-mbcs \
	--with-iconv \
	--disable-rpath \
	--with-libpng \
	--with-jpeglib \
	--with-system-zlib \
	--with-system-bzlib \
	--with-system-pcre \
	--with-readline \
	--enable-R-profiling \
	--enable-R-shlib \
	--enable-BLAS-shlib
%make

pushd src/nmath/standalone 
make
popd

%make pdf
%make info

# DON'T comment "make check" below! If R doesn't pass the 'check' test
# then it is probably badly compiled, or there are problems with
# the compiler.
%check
make check

%install
rm -rf %{buildroot}

# (tpg) makeinstall_std is broken here
%makeinstall install-info rhome=%{buildroot}%{_libdir}/R

pushd src/nmath/standalone
%makeinstall \
    includedir=%{buildroot}%{_includedir} \
    libdir=%{buildroot}%{_libdir}
popd

mv doc/manual/*.pdf $RPM_BUILD_DIR/R-%{version} || :

# Remove latex versions of help pages
#
rm -rf %{buildroot}%{_libdir}/R/library/*/latex/

# Get rid of buildroot in script
for i in %{buildroot}%{_libdir}/R/bin/R %{buildroot}%{_bindir}/R %{buildroot}%{_libdir}/pkgconfig/libR*.pc;
do
  sed -i "s|%{buildroot}||g" $i;
done

# Remove package indices. They are rebuilt by the postinstall script.
#
rm -f %{buildroot}%{_libdir}/R/doc/html/function.html
rm -f %{buildroot}%{_libdir}/R/doc/html/packages.html
rm -f %{buildroot}%{_libdir}/R/doc/html/search/index.txt

# Fix permissions
chmod 644 %{buildroot}%{_libdir}/R/library/MASS/scripts/*
chmod 755 %{buildroot}%{_libdir}/R/share/sh/help-links.sh
chmod 755 %{buildroot}%{_libdir}/R/share/sh/help-print.sh
chmod 755 %{buildroot}%{_libdir}/R/share/sh/echo.sh

mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop <<EOF
[Desktop Entry]
Name=R
Comment=A language for statistical computing
Exec=%{_bindir}/R --gui=tk
Terminal=true
Type=Application
Icon=Rlogo
Categories=Science;Math;
EOF

# icons
mkdir -p %{buildroot}%{_iconsdir}
tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir}

# remove unpackaged files
rm -f %{buildroot}%{_infodir}/dir{,.old*}

# remove private perl libraries
rm -rf %{buildroot}%{_libdir}/R/share/perl/File
rm -rf %{buildroot}%{_libdir}/R/share/perl/Text

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%{update_menus}
%update_icon_cache hicolor
%_install_info R-admin.info
%_install_info R-data.info
%_install_info R-exts.info
%_install_info R-FAQ.info
%_install_info R-intro.info
%_install_info R-lang.info
%{_bindir}/R CMD perl %{_libdir}/R/share/perl/build-help.pl --htmllist > /dev/null 2>&1
cat %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt

%preun 
if [ $1 = 0 ]; then
rm -f %{_libdir}/R/doc/html/function.html \
	 %{_libdir}/R/doc/html/packages.html \
	 %{_libdir}/R/doc/html/search/index.txt
%_remove_install_info R-admin.info
%_remove_install_info R-data.info
%_remove_install_info R-exts.info
%_remove_install_info R-FAQ.info
%_remove_install_info R-intro.info
%_remove_install_info R-lang.info
fi

%postun
%{clean_menus}
%clean_icon_cahe hicolor

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root)
%doc README VERSION NEWS
%doc R-admin.pdf R-data.pdf R-exts.pdf R-FAQ.pdf R-intro.pdf R-lang.pdf refman.pdf
%{_bindir}/R
%{_bindir}/Rscript
%{_mandir}/*/*
%{_libdir}/R
%{_infodir}/*.info*
%{_iconsdir}/*.*
%{_liconsdir}/*.*
%{_miconsdir}/*.*
%{_datadir}/applications/*.desktop
%{_libdir}/pkgconfig/libR.pc

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libRmath.so

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/libRmath.a
%{_includedir}/Rmath.h
%{_libdir}/pkgconfig/libRmath.pc


%changelog
* Wed Dec 19 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-4mdv2008.1
+ Revision: 133819
- fix exceptions for package requires

* Sun Dec 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-3mdv2008.1
+ Revision: 120664
- add requires exceptions on perl(R::*)
- new license policy
- do not package COPYING file
- add missing scriplets

* Wed Dec 12 2007 Guillaume Rousse <guillomovitch@mandriva.org> 2.6.1-2mdv2008.1
+ Revision: 118467
- don't provide private perl libraries
  don't even ship private copies of standard ones

* Tue Nov 27 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.1-1mdv2008.1
+ Revision: 113286
- new version

* Tue Oct 09 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.6.0-1mdv2008.1
+ Revision: 96121
- new version
- requires tk

* Fri Sep 07 2007 Anssi Hannula <anssi@mandriva.org> 2.5.1-3mdv2008.0
+ Revision: 82069
- buildrequires tcl-devel
- rebuild for new soname of tcl

* Thu Sep 06 2007 Adam Williamson <awilliamson@mandriva.com> 2.5.1-2mdv2008.0
+ Revision: 81307
- menu entry fix for #33216

* Tue Jul 03 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.1-1mdv2008.0
+ Revision: 47695
- drop patch 1
- new version

* Sat Jun 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-7mdv2008.0
+ Revision: 40396
- blacklist self-requires on libraries

* Sat Jun 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-6mdv2008.0
+ Revision: 40300
- really remove unneeded requires
- blacklist libraries as a provides

* Fri Jun 15 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-5mdv2008.0
+ Revision: 39940
- blacklist lapack.so from provides
- fix bug #31177
- evince is now default pdf viewer
- fix file list
- get rid of ld.so.conf.d stuff

* Sat May 05 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-4mdv2008.0
+ Revision: 23202
- R doesn't set its own library path, now it does
- correct requires on R and libRmath
- drop unused directory

* Thu May 03 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-3mdv2008.0
+ Revision: 21963
- enable libRmath compiling
- add reworked P1 from Fedora
- added some stuff - hope rkward will work

* Mon Apr 30 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-2mdv2008.0
+ Revision: 19462
- remove buildrequires on liblapack-devel
- drop P0 (seems to be not needed)
- revoke dead configure options and add new ones
- fix buildrequires
- drop old menu style

* Thu Apr 26 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.5.0-1mdv2008.0
+ Revision: 18415
- new version
- own missing files


* Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.1-2mdv2007.0
+ Revision: 122253
- xdg menus.

* Fri Feb 09 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.1-1mdv2007.1
+ Revision: 118653
- Release 2.4.1.

* Wed Nov 15 2006 Olivier Blin <oblin@mandriva.com> 2.4.0-1mdv2007.1
+ Revision: 84511
- 2.4.0
- Import R-base

* Mon Jun 19 2006 Stefan van der Eijk <stefan@eijk.nu.lurtspam> 2.3.1-1mdv2007.0
- rebuild for png

* Sat Jun 03 2006 Jerome Soyer <saispo@mandriva.org> 2.3.1-1mdv2007.0
- New release 2.3.1

* Sat May 20 2006 Jerome Soyer <saispo@mandriva.org> 2.2.1-2mdk
- Rebuild for the new glibc

* Fri Mar 10 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.1-1mdk
- Release 2.2.1.

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.0-5mdk
- rebuilt against soname aware deps

* Sat Dec 10 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.0-4mdk
- Don't use parallel build for %%make check
- Added cups-common to BuildRequires.

* Wed Dec 07 2005 Giuseppe Ghibò <ghibo@mandriva.org> 2.2.0-3mdk
- fix bug #19905.

* Sun Nov 27 2005 Michael Scherer <misc@mandriva.org> 2.2.0-2mdk
- do not provides perl(Text::DelimMatch)

* Thu Oct 20 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.2.0-1mdk
- Release: 2.2.0.

* Fri Aug 05 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.1-2mdk
- Fix BuildRequires

* Thu Aug 04 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.1.1-1mdk
- Release: 2.1.1.

* Fri Jun 17 2005 Couriousous <couriousous@mandriva.org> 2.1.0-2mdk
- Better fix for gcc4 bug
- Patch to allow R starting from desktop menu

* Sun May 08 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.1.0-1mdk
- Merged fixes from Couriousous <couriousous@mandriva.org>:
  - Release: 2.1.0.
  - Enable shared lib.
  - gnome gui is no more provided, use tk one in the menu.
  - Enable Large file support ( > 2Go ).
- lowered optimization from -O2 to -O1 due to gcc/gfortran bugs.
- fixed gcc-g77 BuildRequires.

* Sun Apr 17 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-5mdk
- Replaced libblas3-devel with libblas-devel in BuildConflicts
  (for X86_64).

* Wed Mar 23 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-4mdk
- Added Patch1 for supporting www-browser.

* Sat Jan 22 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.0.1-3mdk
- rebuild for new readline
- wipe out buildroot at the beginning of %%install
- cosmetics

* Thu Dec 16 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-2mdk
- Added libgnome-devel, libglade-devel to BuildRequires.

* Sun Dec 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.1-1mdk
- Release 2.0.1.
- Removed Patch1 (RestoreAction), merged upstream.

* Sat Nov 13 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0.0-1mdk
- Release 2.0.0.
- Removed Patch1, merged upstream.
- Added Patch1 (RestoreAction) for fixing undefined (RestoreAction) in 
  R_gnome.so.

* Tue Oct 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.9.1-3mdk
- Added --gui=gnome to menu entry.
- Added Patch1 to allow R starting from desktop menu.

* Tue Aug 17 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 1.9.1-2mdk
- Rebuild with new menu

* Tue Jul 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.9.1-1mdk
- Release 1.9.1.
- Removed Patch1.