!1 Init package

From: @misaka00251 
Reviewed-by: @laokz 
Signed-off-by: @laokz
This commit is contained in:
openeuler-ci-bot 2022-07-22 07:31:46 +00:00 committed by Gitee
commit 3c36e2470c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From b547ef1de9a9c9ce2425fc8b5a64ff326a584464 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 25 Feb 2020 21:16:57 -0500
Subject: [PATCH] Don't run example that uses the network.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
man/ps_connections.Rd | 2 ++
1 file changed, 2 insertions(+)
diff --git a/man/ps_connections.Rd b/man/ps_connections.Rd
index c77fffa..2392df6 100644
--- a/man/ps_connections.Rd
+++ b/man/ps_connections.Rd
@@ -32,12 +32,14 @@ For a zombie process it throws a \code{zombie_process} error.
}
\examples{
\dontshow{if (ps::ps_is_supported() && ! ps:::is_cran_check()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
+\dontrun{
p <- ps_handle()
ps_connections(p)
sc <- socketConnection("httpbin.org", port = 80)
ps_connections(p)
close(sc)
ps_connections(p)
+}
\dontshow{\}) # examplesIf}
}
\seealso{
--
2.26.2

88
R-ps.spec Normal file
View File

@ -0,0 +1,88 @@
# Bootstrap
%bcond_without bootstrap
%global packname ps
%global packver 1.6.0
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 1.6.0
Release: 1
Summary: List, Query, Manipulate System Processes
License: MIT
URL: https://CRAN.R-project.org/package=%{packname}
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz
Patch0001: 0001-Don-t-run-example-that-uses-the-network.patch
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: R-utils
%if %{without bootstrap}
BuildRequires: R-callr
BuildRequires: R-curl
BuildRequires: R-pingr
BuildRequires: R-processx >= 3.1.0
BuildRequires: R-R6
BuildRequires: R-rlang
BuildRequires: R-testthat
BuildRequires: R-tibble
%endif
%description
List, query and manipulate all system processes, on 'Windows', 'Linux' and
'macOS'.
%prep
%setup -q -c -n %{packname}
pushd %{packname}
%patch0001 -p1
# Don't need coverage; it's not packaged either.
sed -i 's/covr, //g' DESCRIPTION
popd
%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
# Windows
rm %{buildroot}%{rlibdir}/%{packname}/tools/winver.R
%check
%if %{without bootstrap}
%{_bindir}/R CMD check %{packname}
%else
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --no-examples --no-tests
%endif
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%license %{rlibdir}/%{packname}/LICENSE
%doc %{rlibdir}/%{packname}/internals.md
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/bin
%dir %{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/libs/%{packname}.so
%{rlibdir}/%{packname}/tools
%{rlibdir}/%{packname}/WORDLIST
%changelog
* Tue Jun 14 2022 misaka00251 <misaka00251@misakanet.cn> - 1.6.0-1
- Init package (Thanks to fedora team)

BIN
ps_1.6.0.tar.gz Normal file

Binary file not shown.