Blob Blame History Raw
Name:      mapnik
Version:   3.0.9
Release:   9%{?dist}
Summary:   Free Toolkit for developing mapping applications
Group:     Applications/Engineering
License:   LGPLv2+
URL:       http://mapnik.org/
Source0:   http://s3.amazonaws.com/mapnik/dist/v%{version}/mapnik-v%{version}.tar.bz2
Source1:   mapnik-data.license
Source2:   viewer.desktop
# Allow the viewer to be built against uninstalled libraries
Patch0:    mapnik-build-viewer.patch
# Build against the system version of sparsehash
Patch1:    mapnik-system-sparsehash.patch
# Allow some minor differences in the visual tests
Patch2:    mapnik-visual-compare.patch
# Patch tests for changes in boost 1.60
Patch3:    mapnik-boost.patch
# Patch out attempt to set rpath
Patch4:    mapnik-rpath.patch

Requires: dejavu-serif-fonts dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-lgc-serif-fonts dejavu-lgc-sans-fonts dejavu-lgc-sans-mono-fonts
Requires: proj-epsg

BuildRequires: postgresql-devel pkgconfig
BuildRequires: gdal-devel proj-devel
BuildRequires: scons desktop-file-utils gcc-c++
BuildRequires: qt-devel > 4.3
BuildRequires: libxml2-devel boost-devel libicu-devel
BuildRequires: libtiff-devel libjpeg-devel libpng-devel libwebp-devel
BuildRequires: cairo-devel freetype-devel harfbuzz-devel
BuildRequires: sqlite-devel
BuildRequires: sparsehash-devel
BuildRequires: dejavu-sans-fonts proj-epsg
BuildRequires: postgresql-server postgis

# Bundled version has many local patches and upstream is essentially dead
Provides: bundled(agg) = 2.4

# Bundles a couple of files from the unreleased "toolbox" extension
# of the boost GIL library. Attempts are being made to establish the
# status of these files (https://svn.boost.org/trac/boost/ticket/11819)
# in the hope of unbundling them
Provides: bundled(boost)

%filter_provides_in %{_libdir}/%{name}/input
%filter_setup

%description
Mapnik is a Free Toolkit for developing mapping applications.
It's written in C++ and there are Python bindings to
facilitate fast-paced agile development. It can comfortably
be used for both desktop and web development, which was something
I wanted from the beginning.

Mapnik is about making beautiful maps. It uses the AGG library
and offers world class anti-aliasing rendering with subpixel
accuracy for geographic data. It is written from scratch in
modern C++ and doesn't suffer from design decisions made a decade
ago. When it comes to handling common software tasks such as memory
management, filesystem access, regular expressions, parsing and so
on, Mapnik doesn't re-invent the wheel, but utilises best of breed
industry standard libraries from boost.org 


%package devel
Summary: Mapnik is a Free toolkit for developing mapping applications
Group: Development/Tools
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: proj-devel
Requires: boost-devel libicu-devel
Requires: libtiff-devel libjpeg-devel libpng-devel libwebp-devel
Requires: cairo-devel freetype-devel harfbuzz-devel
Requires: sparsehash-devel

%description devel
Mapnik is a Free Toolkit for developing mapping applications.
It's written in C++ and there are Python bindings to
facilitate fast-paced agile development. It can comfortably
be used for both desktop and web development, which was something
I wanted from the beginning.

Mapnik is about making beautiful maps. It uses the AGG library
and offers world class anti-aliasing rendering with subpixel
accuracy for geographic data. It is written from scratch in
modern C++ and doesn't suffer from design decisions made a decade
ago. When it comes to handling common software tasks such as memory
management, filesystem access, regular expressions, parsing and so
on, Mapnik doesn't re-invent the wheel, but utilises best of breed
industry standard libraries from boost.org


%package static
Summary: Static libraries for the Mapnik spatial visualization library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description static
Static libraries for the Mapnik spatial visualization library.


%package utils
License:  GPLv2+
Summary:  Utilities distributed with the Mapnik spatial visualization library
Group:    Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description utils
Miscellaneous utilities distributed with the Mapnik spatial visualization
library.


%package demo
Summary:  Demo utility and some sample data distributed with mapnik
License:  GPLv2+ GeoGratis
Group:    Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: python-%{name}

%description demo
Demo application and sample vector datas distributed with the Mapnik
spatial visualization library.


%prep
%autosetup -p 1 -n mapnik-v%{version}
chmod a-x deps/agg/include/agg_rasterizer_*_aa.h
iconv -f iso8859-1 -t utf-8 demo/data/COPYRIGHT.txt > COPYRIGHT.conv && mv -f COPYRIGHT.conv demo/data/COPYRIGHT.txt
rm -rf deps/mapnik/sparsehash


%build

# fix build flags
sed -i -e "s|-O\%s |-O\%s $RPM_OPT_FLAGS |g" SConstruct

# configure mapnik
scons configure DESTDIR=%{buildroot} \
                PREFIX=%{_prefix} \
                FULL_LIB_PATH=False \
                SYSTEM_FONTS=%{_datadir}/fonts \
                LIBDIR_SCHEMA=%{_lib} \
                SVG2PNG=True \
                DEMO=False \
                XMLPARSER=libxml2 \
                INPUT_PLUGINS=csv,gdal,geojson,ogr,pgraster,postgis,raster,shape,sqlite,topojson

# build mapnik
scons

# build mapnik viewer app
pushd demo/viewer
qmake-qt4 viewer.pro
make
popd


%install

# install mapnik
scons install

# get rid of fonts use external instead
rm -rf %{buildroot}%{_libdir}/%{name}/fonts

# install more utils
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 demo/viewer/viewer %{buildroot}%{_bindir}/
install -p -m 644 %{SOURCE1} demo/data/

# install pkgconfig file
cat > %{name}.pc <<EOF
prefix=%{_prefix}
exec_prefix=%{_prefix}
includedir=%{_includedir}

Name: %{name}
Description: %{summary}
Version: %{version}
Requires: libagg
Libs: -lmapnik
Cflags: -I\${includedir}/%{name}
EOF

mkdir -p %{buildroot}%{_datadir}/pkgconfig
install -p -m 644 %{name}.pc %{buildroot}%{_datadir}/pkgconfig

# install desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}


%check

# create and start a postgres instance
pg_ctl initdb -D pg_data -o "-A ident -E utf8"
pg_ctl start -w -D pg_data -l pg_log -o "-h '' -k $PWD"
createdb -h $PWD template_postgis
psql -h $PWD -c "CREATE EXTENSION postgis" template_postgis

# run tests
PGHOST="$PWD" LANG="en_US.utf8" make test

# stop our postgres instance
pg_ctl stop -D pg_data


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%doc AUTHORS.md CHANGELOG.md README.md
%license COPYING
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/input
%{_libdir}/%{name}/input/*.input
%{_libdir}/lib%{name}*.so.*


%files devel
%doc docs/
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/lib%{name}*.so
%{_datadir}/pkgconfig/%{name}.pc
%{_bindir}/mapnik-config


%files static
%{_libdir}/lib%{name}*.a


%files utils
%{_bindir}/mapnik-index
%{_bindir}/mapnik-render
%{_bindir}/shapeindex
%{_bindir}/svg2png
%{_bindir}/viewer
%{_datadir}/applications/viewer.desktop


%files demo
%doc demo/c++
%doc demo/data
%doc demo/python
%doc demo/simple-renderer
%license demo/data/mapnik-data.license


%changelog
* Tue Jan 26 2016 Tom Hughes <tom@compton.nu> - 3.0.9-9
- Remove %%defattr and fix various rpmlint issues

* Fri Jan 22 2016 Tom Hughes <tom@compton.nu> - 3.0.9-8
- Rebuild for boost 1.60.0

* Mon Dec 28 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 3.0.9-7
- Rebuilt for libwebp soname bump

* Fri Dec 11 2015 Tom Hughes <tom@compton.nu> - 3.0.9-6
- Remove version from python-mapnik dependency

* Thu Dec 10 2015 Tom Hughes <tom@compton.nu> - 3.0.9-5
- Don't do parallel builds as it uses too much memory on ARM builders
- Correct mapnik-python require

* Sun Dec  6 2015 Tom Hughes <tom@compton.nu> - 3.0.9-4
- Allow minor image differences

* Mon Nov 30 2015 Tom Hughes <tom@compton.nu> - 3.0.9-3
- Build with libxml2 as the XML parser so entities work

* Fri Nov 27 2015 Tom Hughes <tom@compton.nu> - 3.0.9-2
- Provide a postgres instance for the tests

* Fri Nov 27 2015 Tom Hughes <tom@compton.nu> - 3.0.9-1
- Update to 3.0.9 upstream release

* Tue Nov 24 2015 Tom Hughes <tom@compton.nu> - 3.0.8-4
- Update various dependencies

* Mon Nov 23 2015 Tom Hughes <tom@compton.nu> - 3.0.8-3
- Add patch to fix infinite loop in shapeindex

* Sun Nov 22 2015 Tom Hughes <tom@compton.nu> - 3.0.8-2
- Install bundled agg headers
- Package static libraries in a subpackage
- Disable all visual tests on non x86_64 machines

* Sun Nov 22 2015 Tom Hughes <tom@compton.nu> - 3.0.8-1
- Update to 3.0.8 upstream release
- Drop mapnik-python subpackage
- Enable geojson, pgraster and topojson input plugins
- Disable osm plugin

* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 2.2.1-0.11.20150127git0639d54
- rebuild for ICU 56.1

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 2.2.1-0.10.20150127git0639d54
- Rebuilt for Boost 1.59

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-0.9.20150127git0639d54
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Mon Jul 27 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.8.20150127git0639d54
- Rebuild for boost 1.58.0

* Mon Jul 27 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.7.20150127git0639d54
- Rebuild for gdal 2.0.0

* Fri Jul 24 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.6.20150127git0639d54
- Rebuild for boost 1.58.0

* Sat Jul 18 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.5.20150127git0639d54
- Rebuild for boost 1.58.0

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

* Fri Apr 24 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.3.20150127git0639d54
- Rebuild for C++ ABI change

* Thu Mar 12 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.2.20150127git0639d54
- Rebuild for libproj soname change

* Tue Jan 27 2015 Tom Hughes <tom@compton.nu> - 2.2.1-0.1.20150127git0639d54
- Update to 2.2.1 prerelease snapshot for boost 1.57 support

* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 2.2.0-14
- Rebuild for boost 1.57.0

* Wed Oct 22 2014 Tom Hughes <tom@compton.nu> - 2.2.0-13
- Rebuild for polyclipping 6.2.0

* Tue Aug 26 2014 David Tardon <dtardon@redhat.com> - 2.2.0-12
- rebuild for ICU 53.1

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

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

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 2.2.0-9
- Rebuild for boost 1.55.0

* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 2.2.0-8
- rebuild for boost 1.55.0

* Fri Mar  7 2014 Tom Hughes <tom@compton.nu> - 2.2.0-7
- Rebuild for polyclipping 6.1.3a

* Thu Feb 13 2014 Tom Hughes <tom@compton.nu> - 2.2.0-6
- Rebuild for icu 52.1

* Tue Aug 27 2013 Orion Poplawski <orion@cora.nwra.com> - 2.2.0-5
- Rebuild for gdal 1.10.0

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

* Sat Jul 27 2013 pmachata@redhat.com - 2.2.0-3
- Rebuild for boost 1.54.0

* Thu Jun 27 2013 Tom Hughes <tom@compton.nu> - 2.2.0-2
- Get the tests running properly
- Enable osm input plugin
- Compile with correct optimisation flags

* Wed Jun  5 2013 Tom Hughes <tom@compton.nu> - 2.2.0-1
- Update to 2.2.0 upstream release

* Sun May 19 2013 Tom Hughes <tom@compton.nu> - 2.1.0-1
- Update to 2.1.0 upstream release
- BuildRequire libcurl-devel for the osm plugin
- Filter out provides from the plugins

* Fri May 17 2013 Tom Hughes <tom@compton.nu> - 2.0.0-14
- Rebuild for libpng 1.6.2

* Thu Feb 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0.0-13
- Remove --vendor from desktop-file-install https://fedorahosted.org/fesco/ticket/1077

* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 2.0.0-12
- Rebuild for Boost-1.53.0

* Sun Feb 03 2013 Kevin Fenzi <kevin@scrye.com> - 2.0.0-11
- Rebuild for broken deps in rawhide

* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 2.0.0-10
- rebuild due to "jpeg8-ABI" feature drop

* Wed Jan 02 2013 Dan Horák <dan[at]danny.cz> - 2.0.0-9
- fix build on big-endian arches and additional 64-bit arches

* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 2.0.0-8
- rebuild against new libjpeg

* Sun Aug 12 2012 Kevin Fenzi <kevin@scrye.com> - 2.0.0-7
- Rebuild for new boost

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jun 05 2012 Caolán McNamara <caolanm@redhat.com> - 2.0.0-5
- Rebuild for new icu soname bump

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4
- Rebuilt for c++ ABI breakage

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Dec 23 2011 Peter Robinson <pbrobinson@fedoraproject.org> - 2.0.0-2
- Add proj-devel to devel package requires
- Drop ancient fedora 11 conditionals

* Tue Nov 22 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 2.0.0-1
- Update to upstream 2.0.0
- Namespace is "mapnik2".
- Add some new binaries to main package and python subpackage
- Add Requires for proj-epsg (#689201) so that tile rendering
  for OSM works out of the box
- Drop old patches

* Tue Nov 22 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.7.1-12
- Rebuild for new boost.

* Mon Oct 17 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.7.1-11
- Rebuild for new icu soname bump

* Thu Jul 21 2011 Kevin Fenzi <kevin@scrye.com> - 0.7.1-10
- Rebuilt for boost 1.47.0 soname bump

* Sun Apr 17 2011 Kalev Lember <kalev@smartlink.ee> - 0.7.1-9
- Rebuilt for boost 1.46.1 soname bump

* Wed Feb  9 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.7.1-8
- Backport and modify upstream changeset to build against newer boost (1.46)
- Also modify demo/viewer patch accordingly

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 28 2010 Bill Nottingham <notting@redhat.com> - 0.7.1-6
- Rebuilt for boost 1.44, again

* Tue Jul 27 2010 Bill Nottingham <notting@redhat.com> - 0.7.1-5
- Rebuilt for boost 1.44

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sat Jul  3 2010 Christopher Brown <snecklifter@gmail.com> - 0.7.1-3
- Update to 0.7.1

* Fri Apr 02 2010 Caolán McNamara <caolanm@redhat.com> - 0.7.0-3
- rebuild for icu 4.4

* Sat Feb 20 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.7.0-2
- Add patch to fix implicit linking fixes FTBFS #564720
  (http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking)

* Sun Jan 24 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.7.0-1
- Update to 0.7.0
- Rebase mapnik-build-viewer patch against 0.7.0
- aggdepends patch no longer seems necessary

* Sat Jan 16 2010 Stepan Kasal <skasal@redhat.com> - 0.6.1-5
- rebuild against new boost

* Sun Nov 29 2009 Christopher Brown <snecklifter@gmail.com> - 0.6.1-4
- Add gcc-c++ BuildRequires and bump to build again

* Sat Sep 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6.1-3
- fix mapnik to properly link to libagg (caolanm)
- fix pkgconfig file (caolanm)

* Fri Aug  7 2009 Christopher Brown <snecker[AT]fedoraproject.org> - 0.6.1-1
- Update to 0.6.1
- Add mapnik-build-viewer.patch
- Drop use-system-fonts.patch as scons provides this
- Drop mapnik-0.5.2-gcc44.patch as the code is now good for gcc44

* Sat Jun 20 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.5.2-0.13.svn780
- Require individual dejavu font packages

* Tue Mar 24 2009 Alex Lancaster <alexlan[AT] fedoraproject org> - 0.5.2-0.12.svn780
- Add patch for compiling against GCC 4.4
- Fix file list for Python
- Fix font Requires: dejavu-fonts-compat and macro

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-0.11.svn780
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Jan 03 2009 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.10.svn780
- fix > fc11 fonts requirement
- new CVS

* Sun Dec 07 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.9.svn738
- fix fonts for F11

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.2-0.8.svn738
- Rebuild for Python 2.6

* Thu Oct 09 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.7.svn738
- require desktop-utils in koji

* Wed Oct 08 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.6.svn738
- fix self dependency build for viewer

* Wed Oct 08 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.5.svn738
- enable viewer application for mapnik's xml templates
- exclude viewer from demo than

* Wed Sep 24 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.4.svn738
- use relative path in a demo file
- enable mapnik.pc

* Fri Sep 12 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.3.svn738
- enable libicu wrap

* Fri Sep 12 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.2.svn738
- fix koji build
- disable smp build with upstream scons

* Thu Sep 11 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.2-0.1.svn738
- new cvs snapshot, x86_64 should work for now
- new cairo dep added

* Mon Aug 25 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.1-4
- License of demo is GPLv2+ GeoGratis

* Fri Jul 25 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.1-3
- fix perms in -demo
- fix demo folder ownership

* Wed Jul 23 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.1-2
- new demo subpackage
- demo and python subpackages have GPLv2+ license
- fix dependency for python ogc server
- *.input plugins will stay in _libdir instead
- fix linkage over plugins

* Sun Jul 06 2008 Balint Cristian <rezso@rdsor.ro> - 0.5.1-1
- the license of mapnik is LGPLv2+
- release is now 0.5.1 from upstream stable
- fix explicit library dependency requirement
- fix library dependency for -devel requirement
- fix library dependency for -python requirement
- fix to use fedora specific compile flag
- fix to use external agg-devel library as shared
- make sure get rid of internal tinyxml and agg chunks
- use libxml2 by default instead of tinyxml
- use macros everywhere in specfile
- use external fedora dejavu fonts insted, get rid of local one
- place tool binaries in _bindir
- add check section and run testsuite, they should pass
- add one python tool
- build and add doxygen docs
- fix multilib issue
- fix UTF-8 and some spurious permission
- include local copied web license of some demo data
- rpmlint should print zarro bugs