!1 Init package

From: @misaka00251 
Reviewed-by: @laokz 
Signed-off-by: @laokz
This commit is contained in:
openeuler-ci-bot 2022-09-05 07:20:05 +00:00 committed by Gitee
commit 8213c34c45
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 73 additions and 0 deletions

73
R-mockery.spec Normal file
View File

@ -0,0 +1,73 @@
%global packname mockery
%global rlibdir %{_datadir}/R/library
# R-knitr dep loop
%global with_doc 0
Name: R-%{packname}
Version: 0.4.2
Release: 1
Summary: Mocking Library for R
License: MIT
URL: https://CRAN.R-project.org/package=%{packname}
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
BuildArch: noarch
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: R-testthat
%if %{with_doc}
BuildRequires: R-knitr
BuildRequires: R-rmarkdown >= 1.0
%endif
BuildRequires: R-R6
%description
The two main functionalities of this package are creating mock objects
(functions) and selectively intercepting calls to a given function that
originate in some other function. It can be used with any testing framework
available for R. Mock objects can be injected with either this package's own
stub() function or a similar with_mock() facility present in the testthat
package.
%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
%check
%if %{with_doc}
%{_bindir}/R CMD check %{packname}
%else
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --ignore-vignettes
%endif
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%license %{rlibdir}/%{packname}/LICENSE
%doc %{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%changelog
* Tue Jun 14 2022 misaka00251 <misaka00251@misakanet.cn> - 0.4.2-1
- Init package (Thanks to fedora team)

BIN
mockery_0.4.2.tar.gz Normal file

Binary file not shown.