Compare commits

...

21 Commits
master ... f7

Author SHA1 Message Date
Fedora Release Engineering ea117af533 dist-git conversion 2010-07-28 09:14:59 +00:00
Bill Nottingham 6f6cbefd06 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 00:21:01 +00:00
Tom Callaway bafb434b37 build cairo backend 2008-05-28 21:05:35 +00:00
Tom Callaway ddc0dc870c fix all the broken links 2008-05-21 19:25:20 +00:00
Tom Callaway d8753a4553 fix poorly constructed file paths in html/packages.html (bz 442727) 2008-05-21 15:29:24 +00:00
Tom Callaway 328935e1fc fix sources 2008-05-13 17:55:15 +00:00
Tom Callaway 93e66bc0fa R 2.7.0 everywhere 2008-05-13 16:54:55 +00:00
Tom Callaway 079435315a work around koji drain bamage 2008-03-12 19:25:19 +00:00
Tom Callaway 8cba01d9a8 2.6.2, take package cleanups to all active releases 2008-02-08 19:27:40 +00:00
Tom Callaway 104d4178c0 2.6.1 2007-11-26 21:10:27 +00:00
Tom Callaway 240acead68 Fix missing perl requires 2007-10-30 13:28:49 +00:00
Tom Callaway 69eeb27ecb fix 2007-10-29 16:50:52 +00:00
Tom Callaway c59a68a1f7 forgot one 2007-10-29 16:47:57 +00:00
Tom Callaway a22a7daf3d forgot bugzilla 343061 2007-10-29 16:42:17 +00:00
Tom Callaway ebf213758d Fix outstanding R bugs 2007-10-29 15:51:05 +00:00
Tom Callaway 2f35f8179b R 2.6.0 2007-10-04 19:43:28 +00:00
Tom Callaway 38d171a9ab Rebuild for ppc32, license tags fixed 2007-08-26 22:51:35 +00:00
Tom Callaway 12f57e49d6 Add scripts and macros to make R packaging easier. 2007-07-06 22:07:34 +00:00
Tom Callaway 7459085146 R 2.5.1 2007-07-03 02:04:55 +00:00
Tom Callaway cc6b4582e4 Resolve bugzilla 241374. 2007-05-25 15:56:16 +00:00
Bill Nottingham 891257002e Initialize branch F-7 for R 2007-05-18 09:24:22 +00:00
7 changed files with 233 additions and 91 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: R
# $Id$
NAME := R
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

18
R-2.7.0-bad-path.patch Normal file
View File

@ -0,0 +1,18 @@
Index: src/unix/Makefile.in
===================================================================
--- src/unix/Makefile.in (revision 45534)
+++ src/unix/Makefile.in (revision 45535)
@@ -78,11 +78,11 @@
-e 's/@VERSION/$(VERSION)/' $(srcdir)/libR.pc.in \
> "$(DESTDIR)$(libdir)/pkgconfig/libR.pc"
-install: install-main install-Rscript
+install: install-main
install: @WANT_R_SHLIB_TRUE@ install-pc
install: @WANT_R_STATIC_TRUE@ install-pc
-install-main:
+install-main: install-Rscript
@$(MKINSTALLDIRS) "$(DESTDIR)$(bindir)"
@$(INSTALL_PROGRAM) Rscript "$(DESTDIR)$(bindir)/Rscript"

21
R-make-search-index.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Figure out what RHOME is set to
TMP_R_HOME=`R RHOME`
# Figure out what R_DOC_DIR is set to
# Ideally, we could ask R just like we do for RHOME, but we can't yet.
TMP_R_DOC_DIR=`grep "R_DOC_DIR=" /usr/bin/R | cut -d "=" -f 2`
# Write out all the contents in arch library locations
cat $TMP_R_HOME/library/*/CONTENTS > $TMP_R_DOC_DIR/html/search/index.txt 2>/dev/null
# Don't use .. based paths, substitute TMP_R_HOME
sed -i "s!../../..!$TMP_R_HOME!g" $TMP_R_DOC_DIR/html/search/index.txt
# Write out all the contents in noarch library locations
cat /usr/share/R/library/*/CONTENTS >> $TMP_R_DOC_DIR/html/search/index.txt 2>/dev/null
# Don't use .. based paths, substitute /usr/share/R
sed -i "s!../../..!/usr/share/R!g" $TMP_R_DOC_DIR/html/search/index.txt
exit 0

253
R.spec
View File

@ -1,12 +1,14 @@
Name: R
Version: 2.5.0
Release: 2%{?dist}
Version: 2.7.0
Release: 5%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
License: GPL
Source1: macros.R
Source2: R-make-search-index.sh
Patch0: R-2.7.0-bad-path.patch
License: GPLv2+
Group: Applications/Engineering
Patch0: R-2.5.0-pkgconfig.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran
BuildRequires: gcc-c++, tetex-latex, texinfo-tex
@ -15,45 +17,41 @@ BuildRequires: tcl-devel, tk-devel, ncurses-devel
BuildRequires: blas >= 3.0, pcre-devel, zlib-devel
BuildRequires: java-1.5.0-gcj, lapack-devel
BuildRequires: libSM-devel, libX11-devel, libICE-devel, libXt-devel
# This isn't entirely true, but Martyn Plummer thinks it will be soon.
BuildRequires: bzip2-devel, libXmu-devel, cairo-devel
BuildRequires: gcc-objc
Requires: evince, cups, firefox
Requires: xdg-utils, cups
# These are the submodules that R provides. Sometimes R modules say they
# depend on one of these submodules rather than just R. These are
# provided for packager convenience.
Provides: R-base = %{version}
Provides: R-boot = 1.2
Provides: R-class = %{version}
Provides: R-cluster = 1.11.5
Provides: R-codetools = 0.1
Provides: R-class = 7.2
Provides: R-cluster = 1.11.10
Provides: R-codetools = 0.2
Provides: R-datasets = %{version}
Provides: R-foreign = 0.8
Provides: R-graphics = %{version}
Provides: R-grDevices = %{version}
Provides: R-grid = %{version}
Provides: R-KernSmooth = 2.22
Provides: R-lattice = 0.15
Provides: R-MASS = %{version}
Provides: R-lattice = 0.17
Provides: R-MASS = 7.2
Provides: R-methods = %{version}
Provides: R-mgcv = 1.3
Provides: R-nlme = 3.1
Provides: R-nnet = %{version}
Provides: R-rcompgen = 0.1
Provides: R-nnet = 7.2
Provides: R-rpart = 3.1
Provides: R-spatial = %{version}
Provides: R-spatial = 7.2
Provides: R-splines = %{version}
Provides: R-stats = %{version}
Provides: R-stats4 = %{version}
Provides: R-survival = 2.31
Provides: R-survival = 2.34
Provides: R-tcltk = %{version}
Provides: R-tools = %{version}
Provides: R-utils = %{version}
Provides: R-VR = 7.2
# Temporary fix to avoid the SNAFU of the 0.fdr.2.* release
Conflicts: R-devel < %{version}-%{release}
%description
A language and environment for statistical computing and graphics.
R is similar to the award-winning S system, which was developed at
@ -71,11 +69,12 @@ and called at run time.
%package devel
Summary: files for development of R packages.
Group: Applications/Engineering
Requires: R = %{version}
Requires: R = %{version}-%{release}
# You need all the BuildRequires for the development version
Requires: gcc-c++, gcc-gfortran, tetex-latex, texinfo
Requires: libpng-devel, libjpeg-devel, readline-devel, ncurses-devel
Requires: libSM-devel, libX11-devel, libICE-devel, libXt-devel
Requires: bzip2-devel, libXmu-devel, cairo-devel
Requires: tcl-devel, tk-devel, pkgconfig
%description devel
@ -101,22 +100,65 @@ and header files.
%prep
%setup -q
%patch0 -p1
%patch0 -p0
# Filter false positive provides.
cat <<EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} \
| grep -v 'File::Copy::Recursive' | grep -v 'Text::DelimMatch'
EOF
%define __perl_provides %{_builddir}/R-%{version}/%{name}-prov
chmod +x %{__perl_provides}
# Filter unwanted Requires:
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} \
| grep -v 'perl(Text::DelimMatch)'
EOF
%define __perl_requires %{_builddir}/R-%{version}/%{name}-req
chmod +x %{__perl_requires}
%build
# Add PATHS to Renviron for R_LIBS
echo 'R_LIBS=${R_LIBS-'"'%{_libdir}/R/library:%{_datadir}/R/library'"'}' >> etc/Renviron.in
export R_PDFVIEWER="%{_bindir}/evince"
export R_PDFVIEWER="%{_bindir}/xdg-open"
export R_PRINTCMD="lpr"
export R_BROWSER="%{_bindir}/firefox"
export F77="gfortran"
export R_BROWSER="%{_bindir}/xdg-open"
case "%{_target_cpu}" in
x86_64|mips64|ppc64|powerpc64|sparc64|s390x)
export CC="gcc -m64"
export CXX="g++ -m64"
export F77="gfortran -m64"
export FC="gfortran -m64"
;;
ia64)
export CC="gcc"
export CXX="g++"
export F77="gfortran"
export FC="gfortran"
;;
*)
export CC="gcc -m32"
export CXX="g++ -m32"
export F77="gfortran -m32"
export FC="gfortran -m32"
;;
esac
export FCFLAGS="%{optflags}"
( %configure \
--with-system-zlib --with-system-bzlib --with-system-pcre \
--with-lapack \
--with-tcl-config=%{_libdir}/tclConfig.sh \
--with-tk-config=%{_libdir}/tkConfig.sh \
--enable-R-shlib )\
--enable-R-shlib \
rdocdir=%{_docdir}/R-%{version} \
rincludedir=%{_includedir}/R \
rsharedir=%{_datadir}/R) \
| grep -A30 'R is now' - > CAPABILITIES
make
(cd src/nmath/standalone; make)
@ -125,67 +167,66 @@ make pdf
make info
%install
%makeinstall rhome=${RPM_BUILD_ROOT}%{_libdir}/R install-info
make DESTDIR=${RPM_BUILD_ROOT} install install-info install-pdf
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir.old
install -p CAPABILITIES ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}
#Install libRmath files
(cd src/nmath/standalone; make install \
includedir=${RPM_BUILD_ROOT}%{_includedir} \
libdir=${RPM_BUILD_ROOT}%{_libdir})
#Fix location of R_HOME_DIR in shell wrapper.
#
sed -e "s@R_HOME_DIR=.*@R_HOME_DIR=%{_libdir}/R@" < bin/R \
> ${RPM_BUILD_ROOT}%{_libdir}/R/bin/R
sed -e "s@R_HOME_DIR=.*@R_HOME_DIR=%{_libdir}/R@" < bin/R \
> ${RPM_BUILD_ROOT}%{_bindir}/R
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/R/bin/R
chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/R
# Get rid of buildroot in script
for i in $RPM_BUILD_ROOT%{_libdir}/R/bin/Rscript $RPM_BUILD_ROOT%{_bindir}/Rscript $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libR*.pc;
do
sed -i "s|$RPM_BUILD_ROOT||g" $i;
done
# Remove package indices. They are rebuilt by the postinstall script.
#
rm -f ${RPM_BUILD_ROOT}%{_libdir}/R/doc/html/function.html
rm -f ${RPM_BUILD_ROOT}%{_libdir}/R/doc/html/packages.html
rm -f ${RPM_BUILD_ROOT}%{_libdir}/R/doc/html/search/index.txt
# Some doc files are also installed. We don't need them
(cd %{buildroot}%{_libdir}/R;
rm -f AUTHORS COPYING COPYING.LIB COPYRIGHTS FAQ NEWS ONEWS RESOURCES THANKS)
(cd src/nmath/standalone; make install DESTDIR=${RPM_BUILD_ROOT})
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}/R/lib" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
mkdir -p $RPM_BUILD_ROOT%{_datadir}/R/library
# Install rpm helper macros
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
install -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
# Install rpm helper script
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/
install -m0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/rpm/
# Fix multilib
touch -r NEWS ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}/CAPABILITIES
touch -r NEWS doc/manual/*.pdf
touch -r NEWS $RPM_BUILD_ROOT%{_bindir}/R
# Fix html/packages.html
# We can safely use RHOME here, because all of these are system packages.
sed -i 's|\..\/\..|%{_libdir}/R|g' $RPM_BUILD_ROOT%{_docdir}/R-%{version}/html/packages.html
for i in $RPM_BUILD_ROOT%{_libdir}/R/library/*/html/*.html; do
sed -i 's|\..\/\..\/..\/doc|%{_docdir}/R-%{version}|g' $i
done
%files
%defattr(-, root, root)
%{_bindir}/R
%{_bindir}/Rscript
%{_datadir}/R
%{_libdir}/R
%dir %{_libdir}/R
%{_libdir}/R/bin
%{_libdir}/R/etc
%{_libdir}/R/lib
%{_libdir}/R/library
%{_libdir}/R/modules
%{_libdir}/R/COPYING
%{_libdir}/R/NEWS
%{_libdir}/R/SVN-REVISION
/usr/lib/rpm/R-make-search-index.sh
%{_infodir}/R-*.info*
%{_sysconfdir}/rpm/macros.R
%{_mandir}/man1/*
%{_docdir}/R-%{version}
%docdir %{_docdir}/R-%{version}
/etc/ld.so.conf.d/*
%doc doc/AUTHORS CAPABILITIES doc/COPYING doc/COPYING.LIB doc/COPYRIGHTS doc/FAQ NEWS
%doc ONEWS README doc/RESOURCES doc/THANKS VERSION
%doc doc/manual/R-admin.pdf
%doc doc/manual/R-FAQ.pdf
%doc doc/manual/R-lang.pdf
%doc doc/manual/R-data.pdf
%doc doc/manual/R-intro.pdf
%files devel
%defattr(-, root, root)
%doc doc/manual/R-exts.pdf
%{_libdir}/pkgconfig/libR.pc
%{_includedir}/R
%files -n libRmath
%defattr(-, root, root)
@ -210,10 +251,18 @@ for doc in admin exts FAQ intro lang; do
fi
done
/sbin/ldconfig
R CMD javareconf > /dev/null 2>&1 || exit 0
# Update package indices
%{_bindir}/R CMD perl %{_libdir}/R/share/perl/build-help.pl --htmllists > /dev/null 2>/dev/null
%__cat %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt 2>/dev/null
%__cat %{_libdir}/R/library/*/CONTENTS > %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null
# Don't use .. based paths, substitute RHOME
sed -i "s!../../..!%{_libdir}/R!g" %{_docdir}/R-%{version}/html/search/index.txt
# This could fail if there are no noarch R libraries on the system.
%__cat %{_datadir}/R/library/*/CONTENTS >> %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null || exit 0
# Don't use .. based paths, substitute /usr/share/R
sed -i "s!../../..!/usr/share/R!g" %{_docdir}/R-%{version}/html/search/index.txt
%preun
if [ $1 = 0 ]; then
@ -224,10 +273,6 @@ if [ $1 = 0 ]; then
/sbin/install-info --delete R-${doc} %{_infodir}/dir 2>/dev/null || :
fi
done
# Remove package indices
%__rm -f %{_libdir}/R/doc/html/function.html
%__rm -f %{_libdir}/R/doc/html/packages.html
%__rm -f %{_libdir}/R/doc/html/search/index.txt
fi
%postun
@ -240,6 +285,76 @@ fi
/sbin/ldconfig
%changelog
* Wed May 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.0-5
- add cairo-devel to BR/R, so that cairo backend gets built
* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.0-4
- fixup sed invocation added in -3
- make -devel package depend on base R = version-release
- fix bad paths in package html files
* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.0-3
- fix poorly constructed file paths in html/packages.html (bz 442727)
* Tue May 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.0-2
- add patch from Martyn Plummer to avoid possible bad path hardcoding in
/usr/bin/Rscript
- properly handle ia64 case (bz 446181)
* Mon Apr 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.0-1
- update to 2.70
- rcompgen is no longer a standalone package
- redirect javareconf to /dev/null (bz 442366)
* Fri Feb 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.2-1
- properly version the items in the VR bundle
- 2.6.2
- don't use setarch for java setup
- fix R post script file
* Thu Jan 31 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.1-4
- multilib handling (thanks Martyn Plummer)
- Update indices in the right place.
* Mon Jan 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.1-3
- move INSTALL back into R main package, as it is useful without the
other -devel bits (e.g. installing noarch package from CRAN)
* Tue Dec 11 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.1-2
- based on changes from Martyn Plummer <martyn.plummer@r-project.org>
- use configure options rdocdir, rincludedir, rsharedir
- use DESTDIR at installation
- remove obsolete generation of packages.html
- move header files and INSTALL R-devel package
* Mon Nov 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.1-1
- bump to 2.6.1
* Tue Oct 30 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.0-3.1
- fix missing perl requires
* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.0-3
- fix multilib conflicts (bz 343061)
* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.0-2
- add R CMD javareconf to post (bz 354541)
- don't pickup bogus perl provides (bz 356071)
- use xdg-open, drop requires for firefox/evince (bz 351841)
* Thu Oct 4 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.6.0-1
- bump to 2.6.0
* Sun Aug 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.5.1-3
- fix license tag
- rebuild for ppc32
* Thu Jul 5 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.5.1-2
- add rpm helper macros, script
* Mon Jul 2 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.5.1-1
- drop patch, upstream fixed
- bump to 2.5.1
* Mon Apr 30 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.5.0-2
- patch from Martyn Plummer fixes .pc files
- add new BR: gcc-objc

9
macros.R Normal file
View File

@ -0,0 +1,9 @@
#
# RPM macros for R packaging
#
#
# Make R search index.txt
#
%_R_make_search_index /usr/lib/rpm/R-make-search-index.sh

View File

@ -1 +1 @@
b9088663fc539c059acfaf19d6d90a69 R-2.5.0.tar.gz
9eaee3eceec1d5f72cea5640ca90768c R-2.7.0.tar.gz