e5eb609
%global npm_name ultron
e5eb609
# Although there are tests
e5eb609
# the dependancies aren't in Fedora yet
e5eb609
%global enable_tests 0
e5eb609
e5eb609
%{?nodejs_find_provides_and_requires}
e5eb609
e5eb609
Summary:       Ultron is a high-intelligence robot
e5eb609
Name:          nodejs-%{npm_name}
e5eb609
Version:       1.0.1
3bf7828
Release:       4%{?dist}
e5eb609
License:       MIT
e5eb609
URL:           https://github.com/unshiftio/ultron
e5eb609
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
e5eb609
# Upstream licence file, will be in next release
e5eb609
#   https://github.com/unshiftio/ultron/blob/master/LICENSE
e5eb609
Source1:       nodejs-ultron-LICENSE
e5eb609
BuildRequires: nodejs-devel
e5eb609
%if 0%{?enable_tests}
e5eb609
BuildRequires:  npm(assume)
e5eb609
BuildRequires:  npm(eventemitter3)
e5eb609
BuildRequires:  npm(istanbul)
e5eb609
BuildRequires:  npm(mocha)
e5eb609
BuildRequires:  npm(pre-commit)
e5eb609
%endif
e5eb609
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
e5eb609
BuildArch:     noarch
e5eb609
e5eb609
%description
e5eb609
Ultron is a high-intelligence robot. It gathers intelligence
e5eb609
so it can start improving upon his rudimentary design. It will
e5eb609
learn your event emitting patterns and find ways to exterminate
e5eb609
them. Allowing you to remove only the event emitters that you
e5eb609
assigned and not the ones that your users or developers assigned.
e5eb609
This can prevent race conditions, memory leaks and even file
e5eb609
descriptor leaks from ever happening as you won't remove clean
e5eb609
up processes.
e5eb609
e5eb609
%prep
e5eb609
%setup -q -n package
e5eb609
cp %{SOURCE1} LICENSE
e5eb609
e5eb609
%build
e5eb609
e5eb609
%install
e5eb609
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
e5eb609
cp -pr index.js package.json test.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
e5eb609
e5eb609
e5eb609
%if 0%{?enable_tests}
e5eb609
%check
e5eb609
mocha --reporter spec --ui bdd test.js
e5eb609
%endif
e5eb609
e5eb609
%files
e5eb609
%doc README.md
e5eb609
%license LICENSE
e5eb609
%{nodejs_sitelib}/%{npm_name}
e5eb609
e5eb609
%changelog
3bf7828
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-4
3bf7828
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3bf7828
e5eb609
* Mon Feb 16 2015 Troy Dawson <tdawson@redhat.com> - 1.0.1-3
e5eb609
- Added upsteam license file as source1
e5eb609
e5eb609
* Fri Feb 13 2015 Troy Dawson <tdawson@redhat.com> - 1.0.1-2
e5eb609
- Removed Group:
e5eb609
- Added a generic MIT license file as source1
e5eb609
e5eb609
* Tue Feb 03 2015 Troy Dawson <tdawson@redhat.com> - 1.0.1-1
e5eb609
- Initial spec file
e5eb609