%global commit bee84c5a1da8c296f97b1d0afdfa0c7bf79148dc
Name: nodejs-mapnik
Version: 1.4.17
Release: 10%{?dist}
Summary: Bindings to Mapnik tile rendering library for Node.js
License: BSD
URL: https://github.com/mapnik/node-mapnik
Source0: https://github.com/mapnik/node-mapnik/archive/%{commit}/node-mapnik-%{commit}.tar.gz
# Reported upstream - https://github.com/mapnik/node-mapnik/issues/163
Patch0: nodejs-mapnik-color.patch
# Reported upstream - https://github.com/mapnik/node-mapnik/issues/170
Patch1: nodejs-mapnik-precision.patch
# Disable HSV support - not supported in Fedora mapnik build
Patch2: nodejs-mapnik-hsv.patch
# Disable use of binary builds via pre-gyp
Patch3: nodejs-mapnik-pregyp.patch
# Update for mapnik-vector-tile 0.6.0
Patch4: nodejs-mapnik-vector.patch
# https://github.com/mapnik/node-mapnik/commit/b4cdd2bb6b8f768f25cc312952985536e49dabf2
Patch5: nodejs-mapnik-nan.patch
ExclusiveArch: %{nodejs_arches}
BuildRequires: nodejs-devel
BuildRequires: node-gyp
BuildRequires: mapnik-devel
BuildRequires: boost-devel
BuildRequires: libicu-devel
BuildRequires: freetype-devel
BuildRequires: sparsehash-devel
BuildRequires: cairo-devel
BuildRequires: polyclipping-devel
BuildRequires: protobuf-lite-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: libxml2-devel
BuildRequires: npm(mapnik-vector-tile) >= 0.6.0
BuildRequires: npm(npm)
BuildRequires: npm(mocha)
BuildRequires: npm(sphericalmercator)
BuildRequires: npm(nan) >= 1.5.0
%{?nodejs_default_filter}
%description
%summary
%prep
%setup -q -n node-mapnik-%{commit}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%nodejs_fixdep mapnik-vector-tile "~0.6.0"
rm -rf node_modules
echo '{}' > common.gypi
%nodejs_symlink_deps --check
%build
%nodejs_symlink_deps --build
export CXXFLAGS="%{optflags}"
node-gyp configure -- -Dmodule_name=mapnik -Dmodule_path=lib/binding
node-gyp build
%install
mkdir -p %{buildroot}/%{nodejs_sitearch}/mapnik
cp -pr package.json bin lib %{buildroot}/%{nodejs_sitearch}/mapnik
mkdir -p %{buildroot}/%{_bindir}
ln -s %{nodejs_sitelib}/mapnik/bin/mapnik-inspect.js %{buildroot}/%{_bindir}/mapnik-inspect
ln -s %{nodejs_sitelib}/mapnik/bin/mapnik-render.js %{buildroot}/%{_bindir}/mapnik-render
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha -R spec -t 5000
%files
%doc LICENSE.txt README.md CHANGELOG.md
%{nodejs_sitearch}/mapnik
%{_bindir}/mapnik-*
%changelog
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.17-10
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
* Fri Jul 24 2015 Tom Hughes <tom@compton.nu> - 1.4.17-9
- Rebuild for boost 1.58.0
* Sat Jul 18 2015 Tom Hughes <tom@compton.nu> - 1.4.17-8
- Rebuild for boost 1.58.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.17-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 29 2015 Kalev Lember <kalevlember@gmail.com> - 1.4.17-6
- Rebuilt for protobuf soname bump
* Wed Jan 28 2015 Tom Hughes <tom@compton.nu> - 1.4.17-5
- Fixed to build with nan 1.6
* Wed Jan 28 2015 Tom Hughes <tom@compton.nu> - 1.4.17-4
- Rebuild for boost 1.57.0
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.4.17-3
- Rebuild for boost 1.57.0
* Tue Oct 28 2014 Tom Hughes <tom@compton.nu> - 1.4.17-2
- Loosen mapnik-vector-tile dependency
* Tue Sep 30 2014 Tom Hughes <tom@compton.nu> - 1.4.17-1
- Update to 1.4.17 upstream release
* Tue Aug 26 2014 Tom Hughes <tom@compton.nu> - 1.4.13-1
- Update to 1.4.13 upstream release
* Mon Aug 18 2014 Tom Hughes <tom@compton.nu> - 1.4.12-1
- Update to 1.4.12 upstream release
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 22 2014 Tom Hughes <tom@compton.nu> - 1.4.10-1
- Update to 1.4.10 upstream release
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 26 2014 Tom Hughes <tom@compton.nu> - 1.4.5-1
- Update to 1.4.5 upstream release
* Sat May 24 2014 Petr Machata <pmachata@redhat.com> - 1.4.4-2
- Rebuild for boost 1.55.0
* Fri May 23 2014 Tom Hughes <tom@compton.nu> - 1.4.4-1
- Update to 1.4.4 upstream release
* Fri May 9 2014 Tom Hughes <tom@compton.nu> - 1.4.3-1
- Update to 1.4.3 upstream release
* Thu Apr 3 2014 Tom Hughes <tom@compton.nu> - 1.4.2-1
- Update to 1.4.2 upstream release
* Mon Mar 3 2014 Tom Hughes <tom@compton.nu> - 1.4.0-2
- Remove nodejs-pre-gyp dependency
* Sun Mar 2 2014 Tom Hughes <tom@compton.nu> - 1.4.0-1
- Update to 1.4.0 upstream release
- Switch to source from github as npm no longer includes tests
* Fri Feb 28 2014 Tom Hughes <tom@compton.nu> - 1.3.4-1
- Update to 1.3.4 upstream release
* Wed Feb 26 2014 Tom Hughes <tom@compton.nu> - 1.3.2-1
- Update to 1.3.2 upstream release
* Sat Feb 22 2014 Tom Hughes <tom@compton.nu> - 1.3.1-1
- Update to 1.3.1 upstream release
* Wed Feb 19 2014 Tom Hughes <tom@compton.nu> - 1.3.0-1
- Update to 1.3.0 upstream release
* Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.3-2
- rebuild for icu-53 (via v8)
* Fri Jan 10 2014 Tom Hughes <tom@compton.nu> - 1.2.3-1
- Update to 1.2.3 upstream release
* Fri Nov 8 2013 Tom Hughes <tom@compton.nu> - 1.2.2-1
- Update to 1.2.2 upstream release
* Fri Sep 27 2013 Tom Hughes <tom@compton.nu> - 1.2.1-1
- Update to 1.2.1 upstream release
* Tue Sep 10 2013 Tom Hughes <tom@compton.nu> - 1.2.0-1
- Update to 1.2.0 upstream release
* Mon Aug 26 2013 Tom Hughes <tom@compton.nu> - 1.1.3-2
- Don't strip the compiled extension module
* Fri Aug 16 2013 Tom Hughes <tom@compton.nu> - 1.1.3-1
- Update to 1.1.3 upstream release
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 30 2013 Tom Hughes <tom@compton.nu> - 1.1.2-1
- Update to 1.1.2 upstream release
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 1.1.0-3
- Rebuild for boost 1.54.0
* Tue Jul 16 2013 Tom Hughes <tom@compton.nu> - 1.1.0-2
- Correct system font paths
* Mon Jul 15 2013 Tom Hughes <tom@compton.nu> - 1.1.0-1
- Update to 1.1.0 upstream release
- Remove mapnik-vector-tile from run time dependencies
* Tue Jul 9 2013 Tom Hughes <tom@compton.nu> - 1.0.0-2
- Add upstream patch for numeric precision issue
* Fri Jul 5 2013 Tom Hughes <tom@compton.nu> - 1.0.0-1
- Update to 1.0.0 upstream release
* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 0.7.22-1
- Initial build of 0.7.22