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) 2017 SUSE LINUX 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
Version:        3.0.19
Release:        0
Summary:        C++/Python toolkit for developing GIS applications
License:        LGPL-2.1+
Group:          Productivity/Graphics/Other
URL:            http://www.mapnik.org/
Source:         %{name}-v%{version}.tar.bz2
Source1:        %{name}.rpmlintrc
# PATCH-FIX-UPSTREAM https://github.com/mapnik/mapnik/issues/3881
Patch1:         mapnik-v3.0.19_compileerror.patch
BuildRequires:  cairomm-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  giflib-devel
BuildRequires:  glibc-devel
BuildRequires:  harfbuzz-devel >= 0.9.34
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
BuildRequires:  proj
Requires:       proj
# for the upgrade script
Requires:       python-xml
Recommends:     python-lxml
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_filesystem-devel >= 1.47
BuildRequires:  libboost_program_options-devel >= 1.47
BuildRequires:  libboost_regex-devel >= 1.47
BuildRequires:  libboost_system-devel >= 1.47
BuildRequires:  boost-devel >= 1.47

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
Summary:        Noto fonts for mapnik
Requires:       mapnik
Requires:       noto-emoji-fonts
Requires:       noto-naskharabic-ui-fonts
Requires:       noto-sans-adlam-fonts
Requires:       noto-sans-adlamunjoined-fonts
Requires:       noto-sans-arabic-ui-fonts
Requires:       noto-sans-armenian-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-buginese-fonts
Requires:       noto-sans-buhid-fonts
Requires:       noto-sans-canadianaboriginal-fonts
Requires:       noto-sans-chakma-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-ui-fonts
Requires:       noto-sans-gurmukhi-ui-fonts
Requires:       noto-sans-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-ui-fonts
Requires:       noto-sans-osage-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-sinhala-ui-fonts
Requires:       noto-sans-sundanese-fonts
Requires:       noto-sans-symbols-fonts
Requires:       noto-sans-symbols2-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-vai-fonts
Requires:       noto-sans-yi-fonts
BuildArch:      noarch

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

Requires M17N:fonts repository for the UI font variants.

Activate with
zypper ar -f https://download.opensuse.org/repositories/M17N:fonts/openSUSE_Leap_yourversionhere M17N:fonts

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

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

CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \
%ifarch x86_64 ppc64le ppc64 aarch64 s390x
%define lds lib64
%define lds lib
python scons/scons.py PREFIX=%{_prefix} PGSQL_INCLUDES=%{_includedir}/pgsql LIBDIR_SCHEMA=%{lds} SVG2PNG=true

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

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

%postun notofonts
if [ $1 = 0 ] ; then
  rm %{_libdir}/%{name}/fonts/Noto*


%files devel

%files notofonts