# tests partially enabled
# 'npm run lint' has as circular dependency problem
# depends on: jshint->htmlparser2->entities->jshint
%global enable_tests 1
%global srcname entities
Name: nodejs-%{srcname}
Version: 1.1.1
Release: 3%{?dist}
Summary: Encode & decode XML/HTML entities with ease
License: BSD
URL: https://github.com/fb55/node-entities
Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
%endif
%description
%{summary}.
%prep
%setup -q -n package
rm -rf node_modules/
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json index.js lib/ maps/ %{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
# lint disabled, depends on jshint
# mocha && npm run lint
mocha
%endif
%files
%doc readme.md LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Dec 6 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-2
- Added rm -rf node_modules/
- Removed group tag
- Set correct license
* Sun Nov 23 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-1
- Initial package