Blame SPECS/nodejs-latest-version.spec

9fd7c7
%{?scl:%scl_package nodejs-%{npm_name}}
9fd7c7
%{!?scl:%global pkg_name %{name}}
9fd7c7
9fd7c7
%{?nodejs_find_provides_and_requires}
9fd7c7
%global npm_name latest-version
9fd7c7
9fd7c7
Summary:       Get the latest version of a npm package
9fd7c7
Name:          %{?scl_prefix}nodejs-%{npm_name}
9fd7c7
Version:       2.0.0
9fd7c7
Release:       2%{?dist}
9fd7c7
License:       MIT
9fd7c7
URL:           https://github.com/sindresorhus/latest-version
9fd7c7
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
9fd7c7
BuildRequires: nodejs010-runtime
9fd7c7
ExclusiveArch: %{nodejs_arches} noarch
9fd7c7
BuildArch:     noarch
9fd7c7
Provides:      %{?scl_prefix}nodejs-%{npm_name} = %{version}
9fd7c7
9fd7c7
%description
9fd7c7
Get the latest version of a npm package
9fd7c7
9fd7c7
Fetches the version directly from the registry instead of 
9fd7c7
depending on the massive npm module like the latest module does.
9fd7c7
9fd7c7
%prep
9fd7c7
%setup -q -n package
9fd7c7
9fd7c7
%build
9fd7c7
9fd7c7
%install
9fd7c7
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
9fd7c7
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
9fd7c7
9fd7c7
%nodejs_symlink_deps
9fd7c7
9fd7c7
%files
9fd7c7
%doc readme.md
9fd7c7
%license license
9fd7c7
%{nodejs_sitelib}/%{npm_name}
9fd7c7
9fd7c7
%changelog
9fd7c7
* Wed Jan 06 2016 Tomas Hrcka <thrcka@redhat.com> - 2.0.0-2
9fd7c7
- Enable scl macros
9fd7c7
9fd7c7
* Wed Dec 16 2015 Troy Dawson <tdawson@redhat.com> - 2.0.0-1
9fd7c7
- Initial package