File R-Lahman.spec of Package R-Lahman
%global packname Lahman
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 3.0_1
Release: 1
Summary: Sean Lahman's Baseball Database
Group: Development/Libraries/Other
License: GPL-1.0
URL: http://cran.r-project.org/web/packages/%{packname}/index.html
Source0: Lahman_3.0-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: R-base
# Package suggestions
#Requires: R-lattice R-ggplot2 R-googleVis R-data.table R-vcd R-plyr R-reshape2 R-zipcode
BuildRequires: texlive
BuildRequires: texinfo
BuildRequires: fdupes
#
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires: texlive-fonts-extra
%endif
BuildRequires: R-base-devel
# Package suggestions, not required to build
#BuildRequires: R-lattice R-ggplot2 R-googleVis R-data.table R-vcd R-plyr R-reshape2 R-zipcode
%description
This package provides the tables from Sean Lahman's Baseball Database as a
set of R data.frames. It uses the data on pitching, hitting and fielding
performance and other tables from 1871 through 2012, as recorded in the
2012 version of the database.
%prep
%setup -q -c -n %{packname}
%build
%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -f %{buildroot}%{rlibdir}/R.css
%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/demo
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/data
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/scripts
%changelog