%{?nodejs_find_provides_and_requires}
Name:                nodejs-image-size
Version:             0.6.3
Release:             1
Summary:             A Node module to get dimensions of any image file
License:             MIT
URL:                 https://www.npmjs.com/package/image-size
Source0:             https://github.com/image-size/image-size/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch:           noarch
ExclusiveArch:       %{nodejs_arches} noarch
BuildRequires:       nodejs-packaging
BuildRequires:       npm(mocha) npm(expect.js) npm(sinon)
%description
%{summary}.

%prep
%autosetup -n image-size-%{version}
rm -rf node_modules

%build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/image-size
cp -pr package.json bin lib %{buildroot}%{nodejs_sitelib}/image-size
mkdir -p %{buildroot}/%{_bindir}
ln -s %{nodejs_sitelib}/image-size/bin/image-size.js %{buildroot}/%{_bindir}/image-size
%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha specs

%files
%doc Readme.md
%license LICENSE
%{nodejs_sitelib}/image-size
%{_bindir}/image-size

%changelog
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 0.6.3-1
- Package init
