File R-markdown.spec of Package R-markdown

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

Name:           R-%{packname}
Version:        0.7.4
Release:        1
Summary:        Markdown rendering for R

Group:          Development/Libraries/Other
License:        GPL-2.0
URL:  {packname}/index.html
Source0:        markdown_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base
Requires:       R-mime

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

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

Markdown is a plain-text formatting syntax that can be converted to XHTML
or other formats. This package provides R bindings to the Sundown markdown
rendering library.

%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}/examples
%doc %{rlibdir}/%{packname}/COPYING
%doc %{rlibdir}/%{packname}/NOTICE
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS