File R-shiny.spec of Package R-shiny

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

Name:           R-%{packname}
Version:        0.12.1
Release:        1
Summary:        Web Application Framework for R

Group:          Development/Libraries/Other
License:        GPL-3.0
Source0:	    shiny_0.12.1.tar.gz 
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base
Requires:         R-methods 
Requires:       R-httpuv
Requires:       R-caTools
Requires:       R-RJSONIO
Requires:       R-xtable
Requires:       R-digest
Requires:       R-htmltools
Requires:       R-mime
Requires:       R-R6
Requires:		R-jsonlite

# Package suggestions
#Requires:         R-datasets R-markdown R-Cairo R-testthat 
BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-base-devel R-methods
BuildRequires:    R-httpuv
BuildRequires:    R-caTools
BuildRequires:    R-RJSONIO
BuildRequires:    R-xtable
BuildRequires:    R-digest
BuildRequires:       R-htmltools
BuildRequires:       R-mime
BuildRequires:       R-R6
BuildRequires:       R-jsonlite

# Package suggestions, not required to build
#BuildRequires: R-datasets R-markdown R-Cairo R-testthat

Shiny makes it incredibly easy to build interactive web applications with
R. Automatic "reactive" binding between inputs and outputs and extensive
pre-built widgets make it possible to build beautiful, responsive, and
powerful applications with minimal effort.

%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}/examples
%doc %{rlibdir}/%{packname}/staticdocs
%doc %{rlibdir}/%{packname}/tests
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%doc %{rlibdir}/%{packname}/LICENSE