%global __brp_check_rpaths %{nil} %global packname DCPO %global packver 0.5.3 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.5.3 Release: 3%{?dist}%{?buildtag} Summary: Dynamic Comparative Public Opinion License: GPL (>= 3) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.4.0 Requires: R-core >= 3.4.0 BuildRequires: R-CRAN-rstan >= 2.18.1 BuildRequires: R-CRAN-StanHeaders >= 2.18.0 BuildRequires: R-CRAN-rstantools >= 2.0.0 BuildRequires: R-CRAN-BH >= 1.66.0.1 BuildRequires: R-CRAN-RcppEigen >= 0.3.3.4.0 BuildRequires: R-CRAN-Rcpp >= 0.12.17 BuildRequires: R-methods BuildRequires: R-CRAN-beepr BuildRequires: R-CRAN-dplyr BuildRequires: R-CRAN-forcats BuildRequires: R-CRAN-janitor BuildRequires: R-CRAN-purrr BuildRequires: R-CRAN-tibble BuildRequires: R-CRAN-tidyr Requires: R-CRAN-rstan >= 2.18.1 Requires: R-CRAN-rstantools >= 2.0.0 Requires: R-CRAN-Rcpp >= 0.12.17 Requires: R-methods Requires: R-CRAN-beepr Requires: R-CRAN-dplyr Requires: R-CRAN-forcats Requires: R-CRAN-janitor Requires: R-CRAN-purrr Requires: R-CRAN-tibble Requires: R-CRAN-tidyr %description Estimates latent variables of public opinion cross-nationally and over time from sparse and incomparable survey data. 'DCPO' uses a population-level graded response model with country-specific item bias terms. Sampling is conducted with 'Stan'. References: Solt (2020) . %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}