%global npm_name node-static
%global enable_tests 0
Summary: Simple, compliant file streaming module for node
Name: nodejs-%{npm_name}
Version: 0.7.1
Release: 2%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/cloudhead/node-static
Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
BuildRequires: nodejs-devel
%if 0%{?enable_tests}
BuildRequires: npm(vows)
%endif
BuildArch: noarch
%description
node-static is a simple, "rfc 2616 compliant" file streaming module
for node.
node-static has an in-memory file cache, making it highly efficient.
node-static understands and supports "conditional GET" and "HEAD" requests.
node-static was inspired by some of the other static-file serving modules
out there, such as node-paperboy and antinode.
%prep
%setup -q -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr benchmark bin etc examples lib package.json test %{buildroot}%{nodejs_sitelib}/%{npm_name}
# Setup Binaries
mkdir %{buildroot}%{_bindir}
ln -s %{nodejs_sitelib}/%{npm_name}/bin/cli.js %{buildroot}%{_bindir}/static
%if 0%{?enable_tests}
%check
vows --spec --isolate
%endif
%files
%doc LICENSE README.md
%{nodejs_sitelib}/%{npm_name}
%{_bindir}/static
%changelog
* Fri Oct 11 2013 Troy Dawson <tdawson@redhat.com> - 0.7.1-2
- Cleaned up description
* Tue Oct 08 2013 Troy Dawson <tdawson@redhat.com> - 0.7.1-1
- Updated to 0.7.1
* Thu Feb 16 2012 Troy Dawson <tdawson@redhat.com> - 0.6.9-1
- Initial build