File nodejs-semver.spec of Package nodejs-semver

%{?nodejs_find_provides_and_requires}

Name:           nodejs-semver
Version:        7.3.2
Release:        3%{?dist}
Summary:        Semantic versioner for npm

License:        BSD
URL:            https://www.npmjs.com/package/semver
Source0:        https://github.com/npm/node-semver/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging
BuildRequires:  npm(tap)

%description
The semantic version comparison library for the Node.js package manager (npm).

%prep
%autosetup -n node-semver-%{version}

%build
#nothing to do

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/semver
cp -pr bin package.json semver.js %{buildroot}%{nodejs_sitelib}/semver
mkdir -p %{buildroot}%{_bindir}
ln -sf ../lib/node_modules/semver/bin/semver %{buildroot}%{_bindir}
%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%tap test/*.js

%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/semver
%{_bindir}/semver