%{?nodejs_find_provides_and_requires}
%global enable_tests 1
%global extraversion -1.2.3
Name: nodejs-dateformat
Version: 1.0.6
Release: 1%{?dist}
Summary: Steven Levithan's excellent dateFormat() function for Node.js
License: MIT
Group: System Environment/Libraries
URL: https://github.com/felixge/node-dateformat
Source0: http://registry.npmjs.org/dateformat/-/dateformat-%{version}%{extraversion}.tgz
# Upstream have been informed about missing LICENSE file.
# Pull request sent: https://github.com/felixge/node-dateformat/pull/14
Source20: LICENSE
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
%description
This is a JavaScript port of Steven Levithan's excellent dateFormat()
function, which provides a simple way to format dates and times
according to a user-specified mask.
%prep
%setup -q -n package
cp -a %{SOURCE20} .
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/dateformat
cp -pr package.json lib/ \
%{buildroot}%{nodejs_sitelib}/dateformat
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
# Test removed upstream.
rm -f test/basic.js
%nodejs_symlink_deps --check
%__nodejs test/*.js
%endif
%files
%doc LICENSE Readme.md
%{nodejs_sitelib}/dateformat
%changelog
* Fri Jun 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.6-1
- initial package