# # spec file for package qgis # # 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: qgis Version: 3.0.3 Release: 0 Summary: QGIS is a Geographic Information System (GIS) License: GPL-2.0 Group: Productivity/Graphics/Visualization/Other URL: https://qgis.org/ Source: https://qgis.org/downloads/%{name}-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.rpmlintrc Source3: qgis_sample_data.zip Source4: https://qgis.org/downloads/%{name}-%{version}.tar.bz2.md5 # Headers in Qt5.11 were cleaned up to no longer include unneeded other headers. Patch0: fix_grass_qt511.patch Patch1: fix_3d_qt511.patch BuildRequires: -post-build-checks BuildRequires: FastCGI-devel BuildRequires: bison >= 2.4 BuildRequires: cmake >= 3.0.0 BuildRequires: fdupes BuildRequires: filesystem BuildRequires: flex >= 2.5.6 BuildRequires: geos-devel >= 3.4 BuildRequires: gpsbabel BuildRequires: grass-devel >= 7.2 BuildRequires: libqscintilla_qt5-devel BuildRequires: libspatialindex-devel BuildRequires: llvm-clang BuildRequires: otb-devel BuildRequires: pkgconfig BuildRequires: poppler-tools BuildRequires: python-qscintilla-qt5-sip BuildRequires: python3-Jinja2 BuildRequires: python3-OWSLib BuildRequires: python3-PyYAML BuildRequires: python3-future BuildRequires: python3-gdal BuildRequires: python3-psycopg2 BuildRequires: python3-pygments BuildRequires: python3-qscintilla-qt5 BuildRequires: python3-qt5-devel BuildRequires: python3-sip-devel > 4.12 BuildRequires: python3-six BuildRequires: python3-termcolor BuildRequires: qtkeychain-qt5-devel >= 0.5 BuildRequires: sqlite-devel >= 3.0 BuildRequires: txt2tags BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: pkgconfig(Qt53DAnimation) BuildRequires: pkgconfig(Qt53DCore) BuildRequires: pkgconfig(Qt53DExtras) BuildRequires: pkgconfig(Qt53DInput) BuildRequires: pkgconfig(Qt53DLogic) BuildRequires: pkgconfig(Qt53DQuick) BuildRequires: pkgconfig(Qt53DQuickAnimation) BuildRequires: pkgconfig(Qt53DQuickExtras) BuildRequires: pkgconfig(Qt53DQuickInput) BuildRequires: pkgconfig(Qt53DQuickRender) BuildRequires: pkgconfig(Qt53DQuickScene2D) BuildRequires: pkgconfig(Qt53DRender) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Designer) BuildRequires: pkgconfig(Qt5Help) BuildRequires: pkgconfig(Qt5Location) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5Positioning) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Qwt6) BuildRequires: pkgconfig(Qt5Script) BuildRequires: pkgconfig(Qt5Sensors) BuildRequires: pkgconfig(Qt5Sql) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5UiTools) BuildRequires: pkgconfig(Qt5WebKit) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(Qt5XmlPatterns) BuildRequires: pkgconfig(expat) >= 1.95 BuildRequires: pkgconfig(gdal) >= 2.1 BuildRequires: pkgconfig(gsl) >= 1.8 BuildRequires: pkgconfig(libpq) > 9.4 BuildRequires: pkgconfig(libzip) BuildRequires: pkgconfig(proj) >= 4.4 BuildRequires: pkgconfig(python3) >= 3.4 BuildRequires: pkgconfig(qca2-qt5) BuildRequires: pkgconfig(spatialite) >= 4.2.0 Requires: python3-Jinja2 Requires: python3-OWSLib Requires: python3-PyYAML Requires: python3-Pygments Requires: python3-future Requires: python3-gdal Requires: python3-psycopg2 # Those are not picked by obs Requires: python3-qscintilla-qt5 Requires: python3-sip > 4.12 Requires: python3-six Requires: python3-termcolor Recommends: %{name}-sample-data Recommends: apache2-mod_fcgid Recommends: gpsbabel Obsoletes: qgis2 Obsoletes: qgis-master Obsoletes: qgis-ltr %package devel Summary: Development Libraries for the QGIS Group: Development/Libraries/C and C++ Requires: python3-qt5-devel Requires: qgis = %{version} %package plugin-grass Summary: GRASS Support Libraries for QGIS Group: Productivity/Graphics/Visualization/Other Requires: grass > 7.0 Requires: grass-docs Requires: qgis = %{version} Obsoletes: qgis-plugin-grass < %{version} %package sample-data %define sampledir sample-data Summary: QGIS sample data Group: Productivity/Graphics/Visualization/Other %description QGIS is a user friendly Open Source Geographic Information System (GIS) that runs on Linux, Unix, Mac OSX, and Windows. QGIS supports vector, raster, OWS and database formats. QGIS is licensed under the GNU General Public License. QGIS lets you browse and create map data on your computer. It supports many common spatial data formats (e.g. ESRI ShapeFile, geotiff). QGIS supports plugins to do things like display tracks from your GPS. %description devel Development packages for QGIS including the C header files. %description plugin-grass GRASS plugin for QGIS required to interface with GRASS system. %description sample-data QGIS sample data with free raster, vector, gps files and a GRASS location from Alaska area. %prep %setup -q %patch0 -p1 %patch1 -p1 #Fix shebang #sed -i "s,^#!/usr/bin/env python$,#!/usr/bin/python," ./src/plugins/grass/modules/*.py %build export CFLAGS="%{optflags}" export QTDIR=%{_prefix} export PATH=$PATH:$QTDIR/bin %ifarch x86_64 aarch64 ppc64 ppc64le %define lib lib64 %else %define lib lib %endif %cmake \ -DQGIS_LIB_SUBDIR=%{lib} \ -DWITH_3D=TRUE \ -DWITH_BINDINGS=TRUE \ -DWITH_GRASS=TRUE \ -DWITH_GRASS7=TRUE \ -DGRASS_PREFIX7=/opt/grass\ -DWITH_QSPATIALITE=TRUE \ -DWITH_SERVER=TRUE \ -DWITH_SERVER_PLUGINS=TRUE \ -DWITH_POSTGRESQL=TRUE \ -DPOSTGRES_LIBRARY=%{_libdir}/libpq.so \ -DQGIS_PLUGIN_SUBDIR=%{lib}/qgis \ -DQGIS_MANUAL_SUBDIR=share/man \ -DQWT_INCLUDE_DIR=%{_includedir}/qwt6 \ -DQCA_INCLUDE_DIR=%{_includedir}/qt5/Qca-qt5/QtCrypto \ -DCMAKE_SKIP_RPATH=OFF \ -Wno-dev export QTDIR=%{_prefix} export PATH=$PATH:$QTDIR/bin %make_jobs %install %cmake_install mkdir -p %{buildroot}%{_datadir}/applications cp %{SOURCE1} %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/pixmaps ln -s ../qgis/images/icons/qgis-icon-512x512.png %{buildroot}/%{_datadir}/pixmaps/qgis.png # Do not update .desktop files %suse_update_desktop_file -n %{name} # Install sample data pushd %{buildroot}%{_datadir}/qgis unzip %{SOURCE3} mv qgis_sample_data %{sampledir} find %{sampledir} -depth \( -name .tmp -o -name .bash\* -o -name \*~ \) -exec rm -r {} \; popd %fdupes -s %{buildroot} %files %{_bindir}/* %{_libdir}/libqgis*so* %{_libdir}/qt5/plugins/sqldrivers/libqsqlspatialite.so %{_mandir}/man1/* %{_datadir}/qgis/* %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/qgis.png %dir %{_libdir}/qgis/ %{_libdir}/qgis/* %exclude %{_libdir}/libqgisgrass7.so %exclude %{_libdir}/libqgisgrass7.so.* %exclude %{_libdir}/qgis/plugins/libgrass* %exclude %{_libdir}/qgis/grass %doc BUGS COPYING README.md %files devel %{_includedir}/qgis/* %files plugin-grass %{_libdir}/libqgisgrass7.so %{_libdir}/libqgisgrass7.so.* # %{_libdir}/qgis/plugins/libgrass* %defattr(755,root,root) %{_libdir}/qgis/grass %files sample-data %{_datadir}/qgis/%{sampledir} %post plugin-grass -p /sbin/ldconfig %postun plugin-grass -p /sbin/ldconfig %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog