Blob Blame History Raw
%global enable_tests 0

Name:           nodejs-zap
Version:        0.2.5
Release:        3%{?dist}
Summary:        A tiny test runner

# License file added upstream:
# https://github.com/nornagon/node-zap/commit/bb04a7c6d9c4fa3bee135b63a19dd97fe6ec0964
License:        MIT
URL:            https://github.com/nornagon/node-zap
Source0:        http://registry.npmjs.org/zap/-/zap-%{version}.tgz
Source1:        zap-license.txt
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%description
A tiny test runner. Each test is run in a separate node
instance - zap require()s your module once to work out what
tests are in it, then once for each test in a new node process.


%prep
%setup -q -n package
cp -pr %{SOURCE1} LICENSE
rm -rf node_modules


%build


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
./bin/zap
%endif


%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/zap
cp -pr package.json bin %{buildroot}/%{nodejs_sitelib}/zap
mkdir -p %{buildroot}/%{_bindir}
ln -s  %{nodejs_sitelib}/zap/bin/zap %{buildroot}/%{_bindir}/nodejs-zap
%nodejs_symlink_deps


%files
%doc LICENSE README.md
%{nodejs_sitelib}/zap
%{_bindir}/nodejs-zap


%changelog
* Thu Jun 27 2013 Tom Hughes <tom@compton.nu> - 0.2.5-3
- Rename /usr/bin/zap to /usr/bin/nodejs-zap to avoid conflict with xbase

* Mon Mar  4 2013 Tom Hughes <tom@compton.nu> - 0.2.5-2
- Add copy of license file from upstream
- Improve description

* Sun Feb 24 2013 Tom Hughes <tom@compton.nu> - 0.2.5-1
- Initial build of 0.2.5