Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1
%global commit 006a8cbac6b99988315834c207896eed71fd069a
%global module_name wrappy

Name:       nodejs-wrappy
Version:    1.0.1
Release:    3%{?dist}
Summary:    Callback wrapping utility
License:    ISC
URL:        https://github.com/npm/wrappy
Source0:    https://github.com/npm/wrappy/archive/%{commit}/wrappy-%{commit}.tar.gz

BuildArch:  noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(tap)
%endif

ExclusiveArch: %{nodejs_arches} noarch

%description
Callback wrapping utility for node.js

%prep
%setup -q -n %{module_name}-%{commit}

%build
#nothing to do

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr wrappy.js package.json \
    %{buildroot}%{nodejs_sitelib}/%{module_name}

%{nodejs_symlink_deps}

%if 0%{?enable_tests}
%check
%{nodejs_symlink_deps} --check
tap test/*.js
%endif

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

%changelog
* Wed Apr 15 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-3
- Use correct github source guidelines
- Use correct module name directory

* Sun Apr 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-2
- Some spec cleanup to follow nodejs packaging guidelines
- Add missing macro in %%check

* Thu Nov 06 2014 Anish Patil <apatil@redhat.com> - 1.0.1-1
- Initial package