%global __brp_check_rpaths %{nil} %global packname postlightmercury %global packver 1.2 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.2 Release: 3%{?dist}%{?buildtag} Summary: Parses Web Pages using Postlight Mercury License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel Requires: R-core BuildArch: noarch BuildRequires: R-CRAN-tibble BuildRequires: R-CRAN-crul BuildRequires: R-CRAN-purrr BuildRequires: R-CRAN-jsonlite BuildRequires: R-CRAN-rvest BuildRequires: R-CRAN-xml2 Requires: R-CRAN-tibble Requires: R-CRAN-crul Requires: R-CRAN-purrr Requires: R-CRAN-jsonlite Requires: R-CRAN-rvest Requires: R-CRAN-xml2 %description This is a wrapper for the Mercury Parser API. The Mercury Parser is a single API endpoint that takes a URL and gives you back the content reliably and easily. With just one API request, Mercury takes any web article and returns only the relevant content — headline, author, body text, relevant images and more — free from any clutter. It’s reliable, easy-to-use and free. See the webpage here: . %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 %{rlibdir}/%{packname}