# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}
# Tests are disabled. We could run them, but they are not shipped with tar.
%global enable_tests 0
%global barename string_decoder
Name: nodejs-string_decoder
Version: 0.10.31
Release: 2%{?dist}
Summary: The string_decoder module from Node core
License: MIT
URL: https://www.npmjs.org/package/string_decoder
Source0: http://registry.npmjs.org/string_decoder/-/string_decoder-%{version}.tgz
BuildArch: noarch
%if 0%{?fedora}
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging >= 6
%if 0%{?enable_tests}
BuildRequires: npm(tap)
%endif
%description
The string_decoder module from Node core.
%prep
%setup -q -n package
# Remove bundled node_modules if there are any..
rm -rf node_modules/
%nodejs_fixdep --caret
%build
%nodejs_symlink_deps --build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/string_decoder
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/string_decoder
%nodejs_symlink_deps
%check
%if 0%{?enable_tests}
%nodejs_symlink_deps --check
tap test/simple/*.js
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/string_decoder/
%changelog
* Thu May 21 2015 Ralph Bean <rbean@redhat.com> - 0.10.31-2
- Process feedback from package review.
- Remove Group tag.
- Remove '19' from fedora conditional.
- Use %%license macro for LICENSE
- Disable tests, since they're not shipped with the tarball.
* Wed May 20 2015 Ralph Bean <rbean@redhat.com> - 0.10.31-1
- Initial packaging for Fedora.