%global __brp_check_rpaths %{nil} %global packname isdparser %global packver 0.4.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.4.0 Release: 3%{?dist}%{?buildtag} Summary: Parse 'NOAA' Integrated Surface Data Files 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 >= 1.2 BuildRequires: R-CRAN-data.table >= 1.10.0 BuildRequires: R-CRAN-lubridate Requires: R-CRAN-tibble >= 1.2 Requires: R-CRAN-data.table >= 1.10.0 Requires: R-CRAN-lubridate %description Tools for parsing 'NOAA' Integrated Surface Data ('ISD') files, described at . Data includes for example, wind speed and direction, temperature, cloud data, sea level pressure, and more. Includes data from approximately 35,000 stations worldwide, though best coverage is in North America/Europe/Australia. Data is stored as variable length ASCII character strings, with most fields optional. Included are tools for parsing entire files, or individual lines of data. %prep %setup -q -c -n %{packname} find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; %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}