!2 add package

Merge pull request !2 from 付安安/master
This commit is contained in:
openeuler-ci-bot 2020-09-08 18:44:51 +08:00 committed by Gitee
commit 10f94c8789
3 changed files with 47 additions and 0 deletions

43
nodejs-clone.spec Normal file
View File

@ -0,0 +1,43 @@
%global enable_tests 1
%global srcname clone
Name: nodejs-%{srcname}
Version: 1.0.2
Release: 1
Summary: Deep cloning of objects and arrays
License: MIT
URL: https://github.com/pvorb/clone
Source0: https://github.com/pvorb/clone/archive/v%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: nodeunit npm(underscore)
%endif
%description
Offers foolproof deep cloning of variables in JavaScript.
%prep
%autosetup -n clone-%{version}
rm -rf node_modules/
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json clone.js %{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
nodeunit test.js
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Mon Aug 17 2020 Anan Fu <fuanan3@huawei.com> - 1.0.2-1
- package init

4
nodejs-clone.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: pvorb/clone
tag_prefix: "^v"
seperator: "."

BIN
v1.0.2.tar.gz Normal file

Binary file not shown.