%{?nodejs_find_provides_and_requires}
%global packagename escape-regexp-component
%global enable_tests 0
# There are no tests for this module
Name: nodejs-escape-regexp-component
Version: 1.0.2
Release: 2%{?dist}
Summary: Escape regular expression special characters
License: MIT
URL: https://github.com/component/escape-regexp
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Source1: LICENSE-MIT.txt
# Upstream is dead and not responding to requests for a license file :-(
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:
%endif
Requires: nodejs
%description
Escape regular expression special characters
%prep
%setup -q -n package
cp -p %{SOURCE1} .
%build
# nothing to do!
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha -R spec
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license LICENSE-MIT.txt
%{nodejs_sitelib}/%{packagename}
%changelog
* Mon Nov 23 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.2-2
- Add license text until upstream provides it
* Sun Nov 8 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.2-1
- Initial packaging