File R-stringi.spec of Package R-stringi

%global packname  stringi
%global rlibdir   %{_libdir}/R/library

Name:           R-%{packname}
Version:        1.0.1
Release:        1
Summary:        Character String Processing Facilities

Group:          Development/Libraries/Other
License:        MIT
URL:  {packname}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base

# Package suggestions

BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
BuildRequires:  pkg-config
BuildRequires:  libicu-devel
BuildRequires:  gcc-c++
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-base-devel 
# Package suggestions, not required to build

Allows for fast, correct, consistent, portable, as well as convenient
character string/text processing in every locale and any native encoding.
Owing to the use of the ICU library, the package provides R users with
platform-independent functions known to Java, Perl, Python, PHP, and Ruby
programmers. Among available features there are: pattern searching (e.g.,
with ICU Java-like regular expressions or the Unicode Collation
Algorithm), random string generation, case mapping, string
transliteration, concatenation, Unicode normalization, date-time
formatting and parsing, etc.

%setup -q -c -n %{packname}


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

%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/AUTHORS
%doc %{rlibdir}/%{packname}/CITATION
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/LICENSE
%doc %{rlibdir}/%{packname}/NEWS