LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mapnik.spec of Package mapnik (Project Application:Geo)

# spec file for package mapnik
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           mapnik
Url:            http://www.mapnik.org/
Version:        2.1.0
Release:        0
Summary:        C++/Python toolkit for developing GIS applications
License:        LGPL-2.1+
Group:          Productivity/Graphics/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         %{name}-v%{version}.tar.bz2
Source1:        %{name}.rpmlintrc
Requires:       proj
# for the upgrade script
Requires:       python-xml
Recommends:     python-lxml
BuildRequires:  boost-devel >= 1.47
BuildRequires:  openmpi-devel
BuildRequires:  cairomm-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  giflib-devel
BuildRequires:  glibc-devel
BuildRequires:  libgdal-devel
BuildRequires:  libicu-devel >= 4.2
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libpqxx-devel
BuildRequires:  libproj-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libxml2-devel
BuildRequires:  postgis
BuildRequires:  postgresql-devel
BuildRequires:  python-cairo-devel
BuildRequires:  python-devel
BuildRequires:  scons

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.

Essentially a collection of geographic objects (map, layer, datasource,
feature, geometry), the library doesn't rely on "windowing systems" and
can be deployed in any server environment. It is intended to play fair in a
multi-threaded environment and is aimed primarily, but not exclusively, at
web-based development.

High-level Python bindings (boost.python) facilitate rapid application
development, targeting zope3, django etc.

%package devel
Summary:        Development Libraries for the mapnik library
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       boost-devel
Requires:       libicu-devel
Requires:       libproj-devel
Requires:       libtool

%description devel
mapnik development libraries for developing mapping applications.

%package python
Summary:        Python bindings for Mapnik
Group:          Development/Libraries/Python
Requires:       mapnik = %{version}

%description python
Python bindings for Mapnik mapping application

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%setup -n %{name}-v%{version}

CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \
%ifarch x86_64
%define lds lib64
%define lds lib
python scons/scons.py PREFIX=/usr PGSQL_INCLUDES=/usr/include/pgsql LIBDIR_SCHEMA=%{lds} 

python scons/scons.py PREFIX=/usr PGSQL_INCLUDES=/usr/include/pgsql DESTDIR=%{buildroot} LIBDIR_SCHEMA=%{lds} install

# remove unwanted scons files
%__rm -f %{buildroot}/%{_bindir}/.sconsign
%__rm -f %{buildroot}/%{_libdir}/.sconsign
%__rm -f %{buildroot}/%{_libdir}/mapnik/fonts/.sconsign
%__rm -f %{buildroot}/%{_libdir}/mapnik/fonts/.sconsign
%__rm -f %{buildroot}/%{_libdir}/mapnik/input/.sconsign
%__rm -f %{buildroot}/%{_libdir}/python2.5/site-packages/mapnik/.sconsign
%__rm -f %{buildroot}/%{_includedir}/mapnik/.sconsign

%__rm -rf %{buildroot}


%files python

%files devel