%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-package
Version: 1.0.1
Release: 4%{?dist}
Summary: Provides an easy way to export package.json data
# License text is contained within Readme.md
License: MIT
Group: System Environment/Libraries
URL: https://github.com/vesln/package
Source0: http://registry.npmjs.org/package/-/package-%{version}.tgz
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
BuildRequires: npm(should)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/package
cp -pr package.json lib/ \
%{buildroot}%{nodejs_sitelib}/package
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
NODE_ENV=test %{nodejs_sitelib}/mocha/bin/mocha -R spec --require should \
$(find test -iname '*.test.js')
%endif
%files
%doc Readme.md examples/
%{nodejs_sitelib}/package
%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Jul 28 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-2
- restrict to compatible arches
* Fri Jun 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-1
- initial package