File R-gsubfn.spec of Package R-gsubfn
%global packname gsubfn
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.6_6
Release: 1
Summary: Utilities for strings and function arguments
Group: Development/Libraries/Other
License: GPL-2.0
URL: http://cran.r-project.org/web/packages/%{packname}/index.html
Source0: gsubfn_0.6-6.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: R-base
Requires: R-proto
# Package suggestions
#Requires: R-boot R-chron R-doBy R-grid R-lattice R-quantreg R-reshape R-svUnit R-tcltk R-zoo
BuildRequires: texlive
BuildRequires: texinfo
BuildRequires: fdupes
#
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires: texlive-fonts-extra
%endif
BuildRequires: R-base-devel R-proto
# Package suggestions, not required to build
#BuildRequires: R-boot R-chron R-doBy R-grid R-lattice R-quantreg R-reshape R-svUnit R-tcltk R-zoo
%description
gsubfn is like gsub but can take a replacement function or certain other
objects instead of the replacement string. Matches and back references are
input to the replacement function and replaced by the function output.
gsubfn can be used to split strings based on content rather than
delimiters and for quasi-perl-style string interpolation. The package also
has facilities for translating formulas to functions and allowing such
formulas in function calls instead of functions. This can be used with R
functions such as apply, sapply, lapply, optim, integrate, xyplot, Filter
and any other function that expects another function as an input argument
or functions like cat or sql calls that may involve strings where
substitution is desirable.
%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
chmod 644 %{buildroot}%{rlibdir}/%{packname}/*.txt
chmod 644 %{buildroot}%{rlibdir}/%{packname}/NEWS
chmod 644 %{buildroot}%{rlibdir}/%{packname}/doc/*
%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/demo
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/*.txt
%doc %{rlibdir}/%{packname}/ANNOUNCE
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%doc %{rlibdir}/%{packname}/THANKS
%doc %{rlibdir}/%{packname}/WISHLIST
%doc %{rlibdir}/%{packname}/unitTests
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%changelog