%global enable_tests 1 Name: nodejs-xml2js Version: 0.2.7 Release: 1%{?dist} Summary: Simple XML to JavaScript object converter License: MIT URL: https://github.com/Leonidas-from-XIV/node-xml2js Source0: http://registry.npmjs.org/xml2js/-/xml2js-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated using Source10, which pulls from the upstream # version control repository. Source1: xml2js-tests-%{version}.tar.bz2 Source10: xml2js-dl-tests.sh BuildArch: noarch BuildRequires: nodejs-devel %if 0%{?enable_tests} BuildRequires: npm(zap) BuildRequires: npm(coffee-script) BuildRequires: npm(sax) %endif %description Ever had the urge to parse XML? And wanted to access the data in some sane, easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is what you're looking for! %prep %setup -q -n package %setup -T -D -a 1 -q -n package %nodejs_fixdep sax "~0.5.2" rm -rf node_modules %build %install mkdir -p %{buildroot}/%{nodejs_sitelib}/xml2js cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/xml2js %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{nodejs_sitelib}/zap/bin/zap %endif %files %doc LICENSE README.md %{nodejs_sitelib}/xml2js %changelog * Tue May 7 2013 Tom Hughes - 0.2.7-1 - Update to 0.2.7 upstream release * Wed Mar 6 2013 Tom Hughes - 0.2.6-2 - Update sax dependency * Mon Mar 4 2013 Tom Hughes - 0.2.6-1 - Update to 0.2.6 release - Add tests, which are now separate - BuildRequire coffee-script and sax for tests * Sun Feb 10 2013 Tom Hughes - 0.2.4-1 - Initial build of 0.2.4