%global __brp_check_rpaths %{nil} %global packname PPMR %global packver 1.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.0 Release: 3%{?dist}%{?buildtag} Summary: Probabilistic Two Sample Mendelian Randomization License: GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5.0 Requires: R-core >= 3.5.0 BuildRequires: R-CRAN-Rcpp >= 1.0.0 BuildRequires: R-CRAN-RcppArmadillo Requires: R-CRAN-Rcpp >= 1.0.0 %description Efficient statistical inference of two-sample MR (Mendelian Randomization) analysis. It can account for the correlated instruments and the horizontal pleiotropy, and can provide the accurate estimates of both causal effect and horizontal pleiotropy effect as well as the two corresponding p-values. There are two main functions in the 'PPMR' package. One is PMR_individual() for individual level data, the other is PMR_summary() for summary data. %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}