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) 2016 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:        3.0.12
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:  cairomm-devel
BuildRequires:  freetype2-devel
BuildRequires:  harfbuzz-devel >= 0.9.34
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:  libwebp-devel
BuildRequires:  libxml2-devel
BuildRequires:  openmpi-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.

%package devel
Summary:        Development Libraries for the mapnik library
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       boost-devel >= 1.47
Requires:       cairomm-devel
Requires:       harfbuzz-devel
Requires:       libicu-devel >= 4.2
Requires:       libjpeg-devel
Requires:       libproj-devel
Requires:       libtiff-devel
Requires:       libtool
Requires:       libwebp-devel
Requires:       libxml2-devel

%description devel
mapnik development libraries for developing mapping applications.

%package notofonts
BuildArch:      noarch
Summary:        Noto fonts for mapnik
Requires:       noto-emoji-fonts
Requires:       noto-naskharabic-ui-fonts
Requires:       noto-sans-armenian-fonts
Requires:       noto-sans-avestan-fonts
Requires:       noto-sans-balinese-fonts
Requires:       noto-sans-bamum-fonts
Requires:       noto-sans-batak-fonts
Requires:       noto-sans-bengali-ui-fonts
Requires:       noto-sans-brahmi-fonts
Requires:       noto-sans-buginese-fonts
Requires:       noto-sans-buhid-fonts
Requires:       noto-sans-canadianaboriginal-fonts
Requires:       noto-sans-cham-fonts
Requires:       noto-sans-cherokee-fonts
Requires:       noto-sans-cjk-fonts
Requires:       noto-sans-coptic-fonts
Requires:       noto-sans-devanagari-fonts
Requires:       noto-sans-devanagari-ui-fonts
Requires:       noto-sans-ethiopic-fonts
Requires:       noto-sans-georgian-fonts
Requires:       noto-sans-gujarati-fonts
Requires:       noto-sans-gujarati-ui-fonts
Requires:       noto-sans-gurmukhi-ui-fonts
Requires:       noto-sans-hanunoo-fonts
Requires:       noto-sans-hebrew-fonts
Requires:       noto-sans-javanese-fonts
Requires:       noto-sans-kannada-ui-fonts
Requires:       noto-sans-kayahli-fonts
Requires:       noto-sans-khmer-ui-fonts
Requires:       noto-sans-lao-ui-fonts
Requires:       noto-sans-lepcha-fonts
Requires:       noto-sans-limbu-fonts
Requires:       noto-sans-lisu-fonts
Requires:       noto-sans-malayalam-ui-fonts
Requires:       noto-sans-mandaic-fonts
Requires:       noto-sans-mongolian-fonts
Requires:       noto-sans-myanmar-ui-fonts
Requires:       noto-sans-newtailue-fonts
Requires:       noto-sans-nko-fonts
Requires:       noto-sans-olchiki-fonts
Requires:       noto-sans-oriya-fonts
Requires:       noto-sans-oriya-ui-fonts
Requires:       noto-sans-osmanya-fonts
Requires:       noto-sans-samaritan-fonts
Requires:       noto-sans-saurashtra-fonts
Requires:       noto-sans-shavian-fonts
Requires:       noto-sans-sinhala-fonts
Requires:       noto-sans-sundanese-fonts
Requires:       noto-sans-symbols-fonts
Requires:       noto-sans-syriaceastern-fonts
Requires:       noto-sans-syriacestrangela-fonts
Requires:       noto-sans-syriacwestern-fonts
Requires:       noto-sans-tagalog-fonts
Requires:       noto-sans-tagbanwa-fonts
Requires:       noto-sans-taile-fonts
Requires:       noto-sans-taitham-fonts
Requires:       noto-sans-taiviet-fonts
Requires:       noto-sans-tamil-ui-fonts
Requires:       noto-sans-telugu-ui-fonts
Requires:       noto-sans-thaana-fonts
Requires:       noto-sans-thai-ui-fonts
Requires:       noto-sans-tibetan-fonts
Requires:       noto-sans-tifinagh-fonts
Requires:       noto-sans-ugaritic-fonts
Requires:       noto-sans-ui-fonts
Requires:       noto-sans-vai-fonts
Requires:       noto-sans-yi-fonts

%description notofonts
Make noto fonts available to mapnik. Contains all the fonts required by main OSM
rendering styles.

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

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

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} SVG2PNG=true

python scons/scons.py PREFIX=/usr PGSQL_INCLUDES=/usr/include/pgsql DESTDIR=%{buildroot} LIBDIR_SCHEMA=%{lds} install
chmod -x %{buildroot}/%{_includedir}/%{name}/agg/*.h

%post notofonts
ln -sf /usr/share/fonts/truetype/Noto* %{_libdir}/%{name}/fonts/

%postun notofonts
rm %{_libdir}/%{name}/fonts/Noto*

%__rm -rf %{buildroot}


%files devel

%files notofonts