Use the tarball from npm instead of github

This commit is contained in:
chengzihan2 2020-09-16 16:14:03 +08:00
parent cd89afbac9
commit 66ca9d0100
2 changed files with 22 additions and 12 deletions

BIN
json-diff-0.5.2.tgz Normal file

Binary file not shown.

View File

@ -1,24 +1,31 @@
%{?nodejs_find_provides_and_requires}
%global packagename json-diff
%global enable_tests 1
Name: nodejs-json-diff
Version: 0.5.2
Release: 1
Summary: JSON diff
License: MIT
URL: https://github.com/andreyvit/json-diff
Source0: https://github.com/andreyvit/json-diff/archive/v%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
Name: nodejs-json-diff
Version: 0.5.2
Release: 2
Summary: JSON diff
License: MIT
URL: https://github.com/andreyvit/json-diff
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Source1: https://github.com/andreyvit/json-diff/archive/v%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: coffee-script mocha npm(cli-color) npm(difflib) npm(should)
BuildRequires: coffee-script mocha npm(cli-color) npm(difflib) npm(should)
%endif
%description
JSON diff
%prep
%autosetup -n json-diff-%{version}
%setup -q -n package
tar -xf %{SOURCE1}
cp -rf %{packagename}-%{version}/test ./
cp -rf %{packagename}-%{version}/example ./
cp -rf %{packagename}-%{version}/doc ./
%nodejs_fixdep cli-color '^1.1.0'
%nodejs_fixdep dreamopt '^0.8.0'
%nodejs_fixdep should
@ -52,5 +59,8 @@ ln -sf %{nodejs_sitelib}/%{packagename}/bin/%{packagename}.js \
%{_bindir}/%{packagename}
%changelog
* Wed Sep 16 2020 chengzihan <chengzihan2@huawei.com> - 0.5.2-2
- Use the Source0 from npm instead of github.
* Tue Sep 1 2020 wutao <wutao61@huawei.com> - 0.5.2-1
- package init