%global enable_tests 0
Name: nodejs-sphericalmercator
Version: 1.0.2
Release: 1%{?dist}
Summary: Transformations between Spherical Mercator and Lat/Lon
License: BSD
URL: https://github.com/mapbox/node-sphericalmercator
Source0: http://registry.npmjs.org/sphericalmercator/-/sphericalmercator-%{version}.tgz
BuildArch: noarch
BuildRequires: nodejs-devel
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
%endif
%description
Provides projection math for converting between mercator meters, screen
pixels (of 256x256 or configurable-size tiles), and latitude/longitude.
%prep
%setup -q -n package
rm -rf node_modules
%build
%if 0%{?enable_tests}
%check
%{nodejs_sitelib}/mocha/bin/mocha
%endif
%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/sphericalmercator
cp -pr package.json sphericalmercator.js %{buildroot}/%{nodejs_sitelib}/sphericalmercator
%nodejs_symlink_deps
%files
%doc LICENSE.md README.md
%{nodejs_sitelib}/sphericalmercator
%changelog
* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 1.0.2-1
- Initial build of 1.0.2