Blob Blame History Raw
Name:           nodejs-mapnik-reference
Version:        5.0.4
Release:        2%{?dist}
Summary:        Reference for Mapnik Styling Options

# License file added upstream:
# https://github.com/mapnik/mapnik-reference/commit/fcc41b3fda18242bf9609709e3038e40f9e48b61
License:        Public Domain
URL:            https://github.com/mapnik/mapnik-reference
Source0:        http://registry.npmjs.org/mapnik-reference/-/mapnik-reference-%{version}.tgz
# Fix paths for auxilliary data to match packaging guidelines
Patch0:         nodejs-mapnik-reference-paths.patch
BuildArch:      noarch

BuildRequires:  nodejs-devel
BuildRequires:  python
BuildRequires:  python-simplejson

%description
Provides a parseable spec of what Mapnik can do - what main structures
it supports (like layers, styles, and symbolizers) and the properties
they can contain. It's useful for building parsers, tests, compilers, and
syntax highlighting/checking for languages


%prep
%setup -q -n package
cp -pr ./ ../package-copy
%patch0 -p0 -b .paths
rm -rf node_modules


%build


%check
pushd ../package-copy
%{__python} test/test.py
popd


%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/mapnik-reference
cp -pr package.json index.js %{buildroot}/%{nodejs_sitelib}/mapnik-reference
mkdir -p %{buildroot}/%{_datadir}/%{name}
cp -pr 2.* latest %{buildroot}/%{_datadir}/%{name}
%nodejs_symlink_deps


%files
%doc README.md CHANGELOG.md
%{nodejs_sitelib}/mapnik-reference
%{_datadir}/%{name}


%changelog
* Sat Mar  2 2013 Tom Hughes <tom@compton.nu> - 5.0.4-2
- Use %%{__python} instead of %%{__python2}
- Run tests against an unpatched copy of the package
- Removed hyphen from parseable in description

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