Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37711308
en ru br
ALT Linux repos
S:4.2.2-alt1
5.0: 2.8.0-alt1
4.1: 2.6.2-alt1
4.0: 2.4.1-alt1
3.0: 1.9.1-alt1

Group :: Sciences/Mathematics
RPM: R-base

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: R-base
Version: 2.6.2
Release: alt1

Summary: A language for data analysis and graphics
License: GPL
Group: Sciences/Mathematics

URL: http://www.r-project.org
Source: R-%version.tar
Patch: R-%version-%release.patch

BuildPreReq: perl-File-Copy-Recursive

# Automatically added by buildreq on Mon Mar 17 2008

BuildRequires: bzlib-devel gcc-c++ gcc-fortran imake libXmu-devel libjpeg-devel liblapack-devel libpcre-devel libpng-devel libreadline-devel tetex-context tetex-dvips tetex-latex tk-devel xorg-cf-files

%description
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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.

S is the statistician's Matlab and R is to S what Octave is to Matlab.

%prep
%setup -q -n R-%version
%patch -p1
rm src/extra/{zlib,bzip2,pcre}/*.[ch]
rm src/extra/blas/*.f src/modules/lapack/*.f

%build
%define verid 2.6
%define Rhome %_libdir/R
%define Rbindir %Rhome/bin
%define Rdocdir %_docdir/R-%verid
export ac_cv_path_R_PDFVIEWER=gv ac_cv_path_PAGER='less -isR' \
ac_cv_path_R_ZIPCMD=zip ac_cv_path_R_UNZIPCMD=unzip \
ac_cv_path_R_BROWSER=url_handler.sh
%configure \
--enable-R-shlib --with-x \
--with-system-zlib --with-system-bzlib --with-system-pcre \
--with-blas=-lblas --with-lapack=-llapack \
--with-tcl-config=%_libdir/tclConfig.sh --with-tk-config=%_libdir/tkConfig.sh \
--libdir='$(prefix)/%_lib' rincludedir='$(prefix)/include/R' \
rdocdir='$(prefix)/share/doc/R-%verid' \
#

%define soname libR-%verid.so.0
mkdir -p lib
ln -s %soname lib/libR.so
%make_build libR_la=%soname LIBR_LDFLAGS=-Wl,-soname=%soname
%make_build pdf info

%ifndef __buildreqs
make check
%endif

%install
%make_install install install-pdf install-info DESTDIR=%buildroot libR_la=%soname
mv %buildroot%Rhome/lib/%soname %buildroot%_libdir/%soname
ln -s `relative %_libdir/%soname %Rhome/lib/libR.so` %buildroot%Rhome/lib/libR.so

ln -s `relative %Rdocdir %Rhome/doc` %buildroot%Rhome/doc
ln -s `relative %_includedir/R %Rhome/include` %buildroot%Rhome/include

cmp %buildroot%_bindir/R %buildroot%Rhome/bin/R
ln -snfv `relative %Rhome/bin/R %_bindir/R` %buildroot%_bindir/R
cmp %buildroot%_bindir/Rscript %buildroot%Rhome/bin/Rscript
ln -snfv `relative %Rhome/bin/Rscript %_bindir/Rscript` %buildroot%_bindir/Rscript

fgrep -r %buildroot %buildroot && exit 1

mkdir -p %buildroot/etc/R
mv %buildroot%Rhome/etc/* %buildroot/etc/R/
rmdir %buildroot%Rhome/etc
ln -s `relative /etc/R %Rhome/etc` %buildroot%Rhome/etc

# libR is relocated, nuke LD_LIBRARY_PATH

[ -f %buildroot/etc/R/ldpaths ]
: >%buildroot/etc/R/ldpaths

mkdir -p %buildroot%_menudir
cat >%buildroot%_menudir/%name <<EOF
?package(%name): \
needs="text" command="/usr/bin/R" \
section="Applications/Sciences/Mathematics" \
title="R" longtitle="R - a language for statistical computing"
EOF

# use system libtool

[ -f %buildroot%Rhome/bin/libtool ]
ln -snfv `relative %_bindir/libtool %Rhome/bin/libtool` %buildroot%Rhome/bin/libtool

%define _perl_lib_path %Rhome/share/perl
rm -rv %buildroot%Rhome/share/perl/File

%pre
# prune relocated directories
/bin/rm -rf %Rhome/doc/ 2>/dev/null ||:
/bin/rm -rf %Rhome/etc/ 2>/dev/null ||:

%triggerun -- R-base < 2.4.1
/bin/mv %Rhome/doc %Rhome/doc~$PPID
/bin/mv %Rhome/etc %Rhome/etc~$PPID

%triggerpostun -- R-base < 2.4.1
/bin/mv %Rhome/doc~$PPID %Rhome/doc
/bin/mv %Rhome/etc~$PPID %Rhome/etc

%post
%post_ldconfig
%update_menus

%postun
%postun_ldconfig
%clean_menus

%files
%_bindir/R
%_bindir/Rscript
%_man1dir/R.*
%_man1dir/Rscript.*
%_libdir/%soname
%_menudir/%name

%dir %Rhome

%dir %Rbindir
%Rbindir/R
%Rbindir/Rscript

%Rbindir/BATCH
%Rbindir/Rcmd
%Rbindir/Rd2dvi
%Rbindir/Rd2txt
%Rbindir/Rdconv
%Rbindir/Rprof
%Rbindir/Sd2Rd
%Rbindir/pager
%Rbindir/Stangle
%Rbindir/Sweave
%Rbindir/javareconf

%dir %Rbindir/exec
%Rbindir/exec/R

%dir /etc/R
%config(noreplace) /etc/R/*
%Rhome/etc

%define R_library_path %Rhome/library
%dir %R_library_path
%doc %R_library_path/R.css

%define R_library() \
%dir %R_library_path/%1 \
%R_library_path/%1/* \
%doc %R_library_path/%1/man \
%doc %R_library_path/%1/html \
%doc %R_library_path/%1/latex \
#doc %R_library_path/%1/help \
#

# Priority: base

%R_library base
%R_library datasets
%R_library grDevices
%R_library graphics
%R_library grid
%R_library methods
%R_library splines
%R_library stats
%R_library stats4
%R_library tools
%R_library utils
# Priority: recommended
%R_library KernSmooth
%R_library MASS
%R_library boot
%R_library class
%R_library cluster
%R_library codetools
%R_library foreign
%R_library lattice
%R_library mgcv
%R_library nlme
%R_library nnet
%R_library rcompgen
%R_library rpart
%R_library spatial
%R_library survival

%dir %Rhome/modules
%Rhome/modules/*.so*
%dir %Rhome/share
%Rhome/share/*

%dir %Rdocdir
%doc %Rdocdir/[A-Z]*
%exclude %Rdocdir/COPYING*
%Rhome/doc

%package -n R-devel
Summary: Development files for the R Statistical Environment
Group: Development/Other
PreReq: R-base = %version-%release

%description -n R-devel
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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, ...).

%files -n R-devel
%dir %Rbindir
%Rbindir/COMPILE
%Rbindir/INSTALL
%Rbindir/LINK
%Rbindir/REMOVE
%Rbindir/Rdiff
%Rbindir/SHLIB
%Rbindir/build
%Rbindir/check
%Rbindir/config
%Rbindir/f77_f2c
%Rbindir/libtool
%Rbindir/mkinstalldirs

%dir %_includedir/R
%_includedir/R/*.h
%dir %_includedir/R/R_ext
%_includedir/R/R_ext/*.h
%Rhome/include

%dir %Rhome
%dir %Rhome/lib
%Rhome/lib/libR.so

%_pkgconfigdir/libR.pc

%package -n R-tcltk
Summary: Tcl/Tk Interface for the R Statistical Environment
Group: Sciences/Mathematics
Requires: R-base = %version-%release

%description -n R-tcltk
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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, ...).

This package provides access to the platform-independent Tcl scripting
language and Tk GUI elements.

%files -n R-tcltk
%add_tcl_lib_path %R_library_path/tcltk
%dir %R_library_path
%R_library tcltk

%package -n R-doc-html
Summary: HTML manuals for the R Statistical Environment
Group: Sciences/Mathematics
Requires: R-base = %version-%release

%description -n R-doc-html
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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, ...).

%files -n R-doc-html
%dir %Rdocdir
%dir %Rdocdir/html/
%doc %Rdocdir/html/*
%dir %Rdocdir/manual/
%doc %Rdocdir/manual/*.html

%package -n R-doc-pdf
Summary: PDF manuals for the R Statistical Environment
Group: Sciences/Mathematics
Conflicts: R-base > %version, R-base < %version

%description -n R-doc-pdf
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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, ...).

%files -n R-doc-pdf
%dir %Rdocdir/manual/
%doc %Rdocdir/manual/*.pdf

%package -n R-doc-info
Summary: Info manuals for the R Statistical Environment
Group: Sciences/Mathematics
Conflicts: R-base > %version, R-base < %version

%description -n R-doc-info
R is `GNU S' - A language and environment for statistical computing
and graphics. R is similar to the award-winning 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, ...).

%files -n R-doc-info
%_infodir/R-*.info*

%post -n R-doc-info
%install_info R-{FAQ,admin,data,exts,intro,ints,lang}.info

%preun -n R-doc-info
%uninstall_info R-{FAQ,admin,data,exts,intro,ints,lang}.info

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin