%global enable_tests 1
Name: nodejs-sax
Version: 0.5.2
Release: 1%{?dist}
Summary: A streaming SAX-style XML parser in JavaScript for Node.js
License: BSD and W3C
Group: System Environment/Libraries
URL: https://github.com/isaacs/sax-js
Source0: http://registry.npmjs.org/sax/-/sax-%{version}.tgz
BuildArch: noarch
BuildRequires: nodejs-devel
%description
This is a SAX-style streaming XML parser in JavaScript for Node.js.
It is:
- A very simple tool to parse through an XML string.
- A stepping stone to a streaming HTML parser.
- A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML docs.
%prep
%setup -q -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/sax
cp -pr package.json lib/ %{buildroot}%{nodejs_sitelib}/sax
rm -f examples/switch-bench.js
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%__nodejs test/index.js
%endif
%files
%doc AUTHORS LICENSE LICENSE-W3C.html README.md examples/
%{nodejs_sitelib}/sax
%changelog
* Thu Feb 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.2-1
- project relicensed from MIT to BSD
- include newly distributed LICENSE-w3C.html
* Wed Feb 20 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.1-2
- fix %%summary and %%description
- add W3C license
* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.1-1
- initial package