Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37569668
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 

%add_findprov_lib_path /usr/lib/R/bin
%set_verify_elf_method relaxed


# -*- rpm-spec -*-

# $Id: R-base,v 1.8 2002/06/13 14:11:52 lioka Exp $
# This SRPM will build the package "R-base-gnome" (R with gnome
# support) if the macro %pkg is defined as "gnome", or R-base
# (R without gnome) if %pkg is defined as R-base.
%undefine __libtoolize

%define pkg base
%define _tcllibdir %_libdir/tcl
%define force_ac_213 0
%define objprelink 0

Name: R-%pkg
Version: 1.9.1
Release: alt1

Summary: A language for data analysis and graphics

Source0: ftp://cran.r-project.org/pub/R/src/base/R-%version.tar.bz2
Source1: R-icons-png.tar.bz2

License: GPL
Group: Sciences/Mathematics
Url: http://www.r-project.org
Icon: logosm-trans.gif
Requires: perl, sed, mozilla
AutoReq: yes, noperl
Packager: Yehuda Ben-Yosef <ilar at altlinux.ru>

# Automatically added by buildreq on Sun Aug 01 2004

BuildRequires: XFree86-devel-static XFree86-libs cm-super-fonts-pfb cm-super-fonts-tex-dvips gcc-c++ gcc-g77
BuildRequires: hostinfo lapack latex2html less libg2c-devel libjpeg-devel libncurses-devel libpng-devel
BuildRequires: libreadline-devel libstdc++-devel mozilla tcl-devel tetex-context tetex-core tetex-dvips
BuildRequires: tetex-latex tk-devel unzip xpdf-reader zip zlib-devel

%if %force_ac_213
BuildRequires: autoconf_2.13
%endif

%description
`GNU S' - A language and environment for statistical computing and
graphics. R is similar to S, 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 and Fortran code can be linked and
called at run time.

%prep
%setup -q -n R-%version

%build
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e s/-ffast-math/-fno-fast-math/g)
export FFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e s/-ffast-math/-fno-fast-math/g)
export FPICFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e s/-ffast-math/-fno-fast-math/g)
autoconf-2.5
if [ %pkg = "base-gnome" ]; then
%configure \
       --enable-R-shlib  \
       --with-gnome \
--with-x \
--with-tcl-config=/usr/lib/tclConfig.sh \
--with-tk-config=/usr/lib/tkConfig.sh
else
%configure \
       --enable-R-shlib \
       --with-x \
--with-tcl-config=/usr/lib/tclConfig.sh \
--with-tk-config=/usr/lib/tkConfig.sh
fi

export DISPLAY=
%if %objprelink
%make_build CXX=g++prelink
%else
%make_build
%endif
%make_build pdf

make check

%install
%makeinstall rhome=$RPM_BUILD_ROOT%_libdir/R

mv doc/manual/*.pdf ${RPM_BUILD_DIR}/R-%version || :
#install src/scripts/LIBINDEX $RPM_BUILD_ROOT/%_bindir

# Remove latex versions of help pages

#
rm -rf $RPM_BUILD_ROOT/%_libdir/R/library/*/latex/

# Fix location of R_HOME_DIR in shell wrapper

#
(cd $RPM_BUILD_ROOT%_bindir
perl -i -pe "s at R_HOME_DIR=.* at R_HOME_DIR=%_libdir/R at " R
)
(cd $RPM_BUILD_ROOT%_libdir/R/bin
perl -i -pe "s at R_HOME_DIR=.* at R_HOME_DIR=%_libdir/R at " R
)

# Remove package indices. They are rebuilt by the postinstall script.

#
rm -f $RPM_BUILD_ROOT%_libdir/R/doc/html/function.html \
   $RPM_BUILD_ROOT%_libdir/R/doc/html/packages.html \
   $RPM_BUILD_ROOT%_libdir/R/library/LibIndex

# menu

mkdir -p $RPM_BUILD_ROOT%_menudir
cat > $RPM_BUILD_ROOT%_menudir/R-base <<EOF
?package(R-base): needs="text" command="/usr/bin/R" \
section="Applications/Sciences/Mathematics" \
title="R" \
longtitle="R - a language for statistical computing" \
icon=Rlogo.xpm
EOF

# icons

mkdir -p $RPM_BUILD_ROOT%_iconsdir
tar xjf %SOURCE1 -C $RPM_BUILD_ROOT%_iconsdir

%post
%update_menus
%_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
# LibIndex is deprecated (remove eventually from previous versions)
rm -rf %_libdir/R/library/LibIndex

%preun
if [ $1 = 0 ]; then
  rm -f %_libdir/R/doc/html/function.html \
%_libdir/R/doc/html/packages.html
%_libdir/R/library/LibIndex
fi

%postun
%clean_menus

%files
%doc AUTHORS BUGS COPYING COPYING.LIB COPYRIGHTS FAQ NEWS ONEWS README RESOURCES THANKS VERSION Y2K
%doc R-data.pdf R-exts.pdf R-FAQ.pdf R-intro.pdf R-lang.pdf refman.pdf
%_bindir/*
%_mandir/man?/*
%_libdir/R
%_menudir/*
%_iconsdir/*.png
%_liconsdir/*.png
%_miconsdir/*.png

%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