Blob Blame History Raw
%global enable_tests 0

Name:           nodejs-millstone
Version:        0.6.8
Release:        1%{?dist}
Summary:        Prepares data sources in an MML file for consumption in Mapnik

License:        BSD
URL:            https://github.com/mapbox/millstone
Source0:        http://registry.npmjs.org/millstone/-/millstone-%{version}.tgz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(generic-pool)
BuildRequires:  npm(mime)
BuildRequires:  npm(request)
BuildRequires:  npm(srs) >= 0.3.6
BuildRequires:  npm(step)
BuildRequires:  npm(underscore)
BuildRequires:  npm(zipfile)
%endif

%description
As of carto 0.2.0, the Carto module expects all data sources and
resources to be localized - remote references like URLs and providers
are not downloaded when maps are rendered.

Millstone now contains this logic - it provides two functions, resolve
and flush. Resolve takes an MML file and returns a localized version, and
flush can be used to clear the cache of a specific resource.


%prep
%setup -q -n package
%nodejs_fixdep request "2.x"
%nodejs_fixdep optimist "~0.4.0"
%nodejs_fixdep underscore "~1.4.4"
rm -rf node_modules


%build


%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/millstone
cp -pr package.json bin lib %{buildroot}/%{nodejs_sitelib}/millstone
%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
NODE_PATH=lib %{nodejs_sitelib}/mocha/bin/mocha -R spec --timeout 10000
%endif


%files
%doc LICENSE README.md CHANGELOG.md architecture.txt
%{nodejs_sitelib}/millstone


%changelog
* Wed Oct 30 2013 Tom Hughes <tom@compton.nu> - 0.6.8-1
- Update to 0.6.8 upstream release

* Tue Oct  1 2013 Tom Hughes <tom@compton.nu> - 0.6.5-1
- Update to 0.6.5 upstream release

* Tue Sep 24 2013 Tom Hughes <tom@compton.nu> - 0.6.4-1
- Update to 0.6.4 upstream release.

* Fri Sep 20 2013 Tom Hughes <tom@compton.nu> - 0.6.1-1
- Update to 0.6.1 upstream release
- Update to latest nodejs packaging standards

* Mon Aug 12 2013 Tom Hughes <tom@compton.nu> - 0.6.0-2
- Fix dependencies

* Sun Aug 11 2013 Tom Hughes <tom@compton.nu> - 0.6.0-1
- Update to 0.6.0 upstream release

* Fri Aug  9 2013 Tom Hughes <tom@compton.nu> - 0.5.15-5
- Rebuild against nodejs-srs 0.3.0

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.15-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Apr  4 2013 Tom Hughes <tom@compton.nu> - 0.5.15-3
- Rebuild against nodejs-request 2.16

* Thu Mar 14 2013 Tom Hughes <tom@compton.nu> - 0.5.15-2
- Rebuild against nodejs-request 2.14

* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 0.5.15-1
- Initial build of 0.5.15