File R-mime.spec of Package R-mime

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

Name:           R-%{packname}
Version:        0.5
Release:        1
Summary:        Map filenames to MIME types

Group:          Development/Libraries/Other
License:        GPL-2.0
URL:            https://cran.r-project.org/src/contrib/⅜{packname}_%{version}.tar.gz
Source0:        mime_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base

# Package suggestions

BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
#
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra
%endif

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

%description
This package guesses the MIME type from a filename extension using the
data derived from /etc/mime.types in UNIX-type systems.

%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


%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/libs


%changelog