Blob Blame History Raw
%bcond_with internet

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

License:        BSD
URL:            https://github.com/mapbox/millstone
Source0:        https://registry.npmjs.org/millstone/-/millstone-%{version}.tgz
# Remove tests that need internet access
Patch0:         nodejs-millstone-internet.patch
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

BuildRequires:  npm(mocha)
BuildRequires:  npm(generic-pool)
BuildRequires:  npm(mime)
BuildRequires:  npm(request)
BuildRequires:  npm(srs) >= 0.4.1
BuildRequires:  npm(step)
BuildRequires:  npm(underscore)
BuildRequires:  npm(zipfile) >= 0.5.5

%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
%if ! %{with internet}
%patch0 -p1
%endif
%nodejs_fixdep generic-pool "^2.0.3"
%nodejs_fixdep request "^2.25.0"
%nodejs_fixdep optimist "^0.4.0"
%nodejs_fixdep sqlite3 "^3.0.0"
%nodejs_fixdep srs "^1.0.1"
%nodejs_fixdep underscore "^1.5.1"
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


%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha -R spec --timeout 10000


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


%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.16-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan  1 2016 Tom Hughes <tom@compton.nu> - 0.6.16-5
- Remove npm(mkdirp) fixdep

* Mon Nov 30 2015 Tom Hughes <tom@compton.nu> - 0.6.16-4
- Enable tests

* Sun Nov 29 2015 Tom Hughes <tom@compton.nu> - 0.6.16-3
- Update srs dependency

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jan 14 2015 Tom Hughes <tom@compton.nu> - 0.6.16-1
- Update to 0.6.16 upstream release

* Thu Nov 20 2014 Tom Hughes <tom@compton.nu> - 0.6.15-1
- Update to 0.6.15 upstream release

* Mon Sep 22 2014 Tom Hughes <tom@compton.nu> - 0.6.14-2
- Update sqlite3 dependency

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Tom Hughes <tom@compton.nu> - 0.6.14-1
- Update to 0.6.14 upstream release

* Fri May  2 2014 Tom Hughes <tom@compton.nu> - 0.6.12-4
- Fix srs dependency

* Fri Apr 18 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.12-3
- fix version of npm(underscore) dependency

* Thu Apr 17 2014 Tom Hughes <tom@compton.nu> - 0.6.12-2
- Fix underscore dependency

* Wed Apr 16 2014 Tom Hughes <tom@compton.nu> - 0.6.12-1
- Update to 0.6.12 upstream release

* Sat Mar 15 2014 Tom Hughes <tom@compton.nu> - 0.6.11-2
- Fix zipfile dependency

* Sat Feb  8 2014 Tom Hughes <tom@compton.nu> - 0.6.11-1
- Update to 0.6.11 upstream release

* Thu Feb  6 2014 Tom Hughes <tom@compton.nu> - 0.6.10-1
- Update to 0.6.10 upstream release

* Sun Jan 19 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.6.8-2
- fix underscore for 1.5.1

* 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