A new user interface for you!

File R-formatR.spec of Package R-formatR

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

Name:           R-%{packname}
Version:        1.0
Release:        0
Summary:        Format R Code Automatically

Group:          Development/Libraries/Other
License:        GPL
URL:            http://cran.r-project.org/web/packages/%{packname}
Source0:        formatR_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base

# Package suggestions
#Requires:         R-codetools R-gWidgetsRGtk2 R-testit R-knitr 
BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-base-devel 
# Package suggestions, not required to build
#BuildRequires: R-codetools R-gWidgetsRGtk2 R-testit R-knitr

This package provides a function tidy.source() and optionally a GUI (by
gWidgets and preferably gWidgetsRGtk2) to format R source code. Spaces and
indent will be added to the code automatically, and comments will be
preserved under certain conditions, so that R code will be more
human-readable and tidy.

%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}/doc
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/shiny/DESCRIPTION
%doc %{rlibdir}/%{packname}/shiny/Readme.md
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS