nodejs-eventemitter2/nodejs-eventemitter2.spec
2020-08-28 17:55:10 +08:00

49 lines
1.4 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 0
Name: nodejs-eventemitter2
Version: 0.4.13
Release: 1
Summary: A Node.js event emitter implementation with namespaces, wildcards and TTL
License: MIT
URL: https://github.com/hij1nx/EventEmitter2
Source0: http://registry.npmjs.org/eventemitter2/-/eventemitter2-%{version}.tgz
Source1: tests-%{version}.tar.bz2
Source10: dl-tests.sh
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(nodeunit)
%endif
%description
A Node.js event emitter implementation with namespaces, wildcards,
time to live (TTL) and browser support.
%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/eventemitter2
cp -pr package.json index.js lib/ \
%{buildroot}%{nodejs_sitelib}/eventemitter2
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/nodeunit/bin/nodeunit test/simple/
%{nodejs_sitelib}/nodeunit/bin/nodeunit test/wildcardEvents/
%endif
%files
%doc README.md
%{nodejs_sitelib}/eventemitter2
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.4.13-1
- package init