qgis/qgis.spec
Martin Pluskal 3b961ab5ea Accepting request 563450 from home:wolfi323:branches:Application:Geo
- Build without QtWebKit on Tumbleweed and SLE/Leap 15,
  libQtWebKit4 is about to be dropped soon
- Use cmake macros
- Cleanup with spec-cleaner
- Update to 2.18.15 
- Update to 2.8.14 (Qgis 2.8 will become the new ltr soon) 
- Remove obsolete BuildRequires qca-devel (qca 1.x has been removed
  in Tumbleweed)
  We've been already using libqca2-devel
  Fix boo@1065257
- Update to 2.18.13 
- Update to 2.18.12 
- Update to 2.18.11 
- Fix error package name python-Pygments and python-Jinja2
- Update to 2.18.10
- Packaging
  + Add python2-Pygments and python2-Jinja2 need by MetaSearch
    Catalogue Client plugin
- Packaging 
  + Remove non existent requires only python-qscintilla is needed, 
    the qt4 and qt5 variant will requires the right -sip subpackage
  + Move python-qt4-devel to -devel package
- Update to 2.18.9 
- Update to 2.18.7
- Update to 2.18.6
- Packaging: 
  + remove merged upstream-85a0db2-additionnal-fix-sip.patch
  + Add full source url + md5
- Packaging: 
  + Add upstream-85a0db2-additionnal-fix-sip.patch for sip 4.19.1
    exclusively applied for TW
- Update to 2.18.4
- Update to 2.18.3
- Packaging : 
  + added upstream-2c43568-qt_bug.patch to fix build errors on Leap
- Fix build for non-x86 64-bit arch (aarch64 ppc64 ppc64le)
- Update to 2.18.2
- Update to 2.18.1
- Update to 2.18.0
- Update to 2.16.3
- Update to 2.16.2
- Update to 2.16.1 
- Update to 2.16.0 
- Update to 2.14.3
- Update to 2.14.2
- Update to 2.14.1 
- Fix Desktop shortcut to 2.14.0 "Essen"
- Update to 2.14.0 
- Update to 2.12.3
- Update to 2.12.2
- Update to libspatialindex4
- Update to 2.12.1
- New QGIS release 2.12.0 
- back to using grass package
------------------------------------------------------------------
- New QGIS release 2.10.1
------------------------------------------------------------------
- New QGIS release 2.10.0
- obsolete qgis2-plugin-grass 
- update to build with grass7 support instead of grass 6
- change cmake parameters to build with qgis server again
- change dependency order
- small update desktop file 
- Minor QGIS release 2.8.2
- Minor QGIS release 2.8.1
- New QGIS release 2.8.0
- Do not obsolete grass7 unless grass-plugin is used
- Removed requirements (OBS resolves requirements automatically)
- New QGIS release 2.6.1
- obsolet grass7 - use grass stable package instead 
- added python-wxWidgets as dependency 
- added libqscintilla dependencies 
- New QGIS release 2.6 
- New QGIS release 2.4 
- New QGIS release 2.2  
- fix spatialite support for python plugin 
- add sample data as separate package
- more spec cleanup
- add missing private declarations for python sip bindings
- fix qgis.spec file: add missing %dirs, cleanup
- Added python-psycopg2 as requirement 
- clean up  
- added python-qscintilla as requirement
- added python-matplotlib as requirement 
- update to version 2.0.1, because of swisstopo acknowledgement for 
  the splash screen and small bug fixes 
- start building qgis packages for version 2.x

OBS-URL: https://build.opensuse.org/request/show/563450
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=226
2018-01-11 09:04:34 +00:00

245 lines
7.1 KiB
RPMSpec

#
# 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: 2.18.15
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
BuildRequires: -post-build-checks
BuildRequires: FastCGI-devel
BuildRequires: bison >= 2.4
BuildRequires: cmake >= 2.8.6
BuildRequires: fdupes
BuildRequires: flex >= 2.5.6
BuildRequires: gdal >= 1.4
BuildRequires: grass >= 7
BuildRequires: grass-devel
BuildRequires: gsl >= 1.8
BuildRequires: gsl-devel
%if 0%{?suse_version} < 1500
BuildRequires: libQtWebKit-devel
%endif
BuildRequires: libexpat-devel
BuildRequires: libgdal-devel >= 1.4.0
BuildRequires: libgeos-devel >= 3.4
BuildRequires: libproj-devel
BuildRequires: libqca2-devel
BuildRequires: libqjson-devel
BuildRequires: libqscintilla-devel
BuildRequires: libqt4-devel >= 4.8
BuildRequires: libqt4-qt3support >= 4.8
BuildRequires: libspatialindex-devel
BuildRequires: libspatialindex4
BuildRequires: libspatialite-devel
BuildRequires: postgresql-devel >= 8
BuildRequires: python-devel >= 2.7
%if 0%{?suse_version} > 1325
BuildRequires: python-qscintilla-qt4
BuildRequires: python-qscintilla-qt4-sip
BuildRequires: libqscintilla_qt4-devel
%endif
BuildRequires: python-qt4-devel
BuildRequires: python-sip-devel
BuildRequires: qwt-devel >= 5
BuildRequires: sqlite-devel >= 3.5
BuildRequires: txt2tags
BuildRequires: unzip
BuildRequires: update-desktop-files
Requires: libqca2
Requires: python-Jinja2
Requires: python-Pygments
Requires: python-gdal
Requires: python-matplotlib
Requires: python-psycopg2
Requires: python-qscintilla
%if 0%{?suse_version} > 1325
Requires: python-qscintilla-qt4
Requires: python-qscintilla-qt4-sip
%endif
Requires: python-qt4
Requires: python-qt4-utils
Requires: python-requests
Requires: python-sip
Requires: python-xml
Recommends: %{name}-sample-data
Recommends: apache2-mod_fcgid
Recommends: gpsbabel
Recommends: libqca2-plugin-cyrus-sasl
Recommends: libqca2-plugin-pkcs11
Obsoletes: qgis2
Obsoletes: qgis-master
Obsoletes: qgis-ltr
# Fix TW dependencies
%if 0%{?suse_version} > 1325
BuildRequires: libwx_gtk2u_qa-suse3 > 3.0
BuildRequires: python-wxWidgets > 3.0
%else
BuildRequires: libwx_gtk2u_qa-2_8-0-stl
BuildRequires: python-wxWidgets
%endif
%if 0%{?suse_version} > 1325
Requires: libwx_gtk2u_qa-suse3 > 3.0
Requires: python-wxWidgets > 3.0
%else
Requires: libwx_gtk2u_qa-2_8-0-stl
Requires: python-wxWidgets
%endif
%package devel
Summary: Development Libraries for the QGIS
Group: Development/Libraries/C and C++
Requires: python-qt4-devel
Requires: qgis = %{version}
%package plugin-grass
Summary: GRASS Support Libraries for QGIS
Group: Productivity/Graphics/Visualization/Other
Requires: grass
Requires: grass-docs
Requires: qgis = %{version}
%package sample-data
%define builddir build
%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
#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_BINDINGS=TRUE \
-DWITH_QSPATIALITE=TRUE \
-DWITH_PYSPATIALITE=TRUE \
-DWITH_SERVER=TRUE \
-DWITH_SERVER_PLUGINS=TRUE \
-DWITH_POSTGRESQL=TRUE \
%if 0%{?suse_version} >= 1500
-DWITH_QTWEBKIT=FALSE \
%endif
-DPOSTGRES_LIBRARY=%{_libdir}/libpq.so \
-DQGIS_PLUGIN_SUBDIR=%{lib}/qgis \
-DQGIS_MANUAL_SUBDIR=share/man \
-DQWT_INCLUDE_DIR=%{_includedir}/qwt5 \
-DCMAKE_SKIP_RPATH=OFF \
-Wno-dev
#echo "for 'make' run first:"
export QTDIR=%{_prefix}
#echo "export PATH=$PATH:$QTDIR/bin"
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.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}/libqgispython.s*
#%%{_libdir}/libqgis_*s*
%{_libdir}/libqgis*s*
%{_libdir}/qgis/
%{_libdir}/qt4/plugins/sqldrivers/libqsqlspatialite.so
%{_mandir}/man1/*
%{_datadir}/qgis/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/qgis.png
%{_libdir}/qgis/qgis_help
%{_libdir}/qgis/crssync
%exclude %{_prefix}/lib/debug/
%exclude %{_libdir}/libqgisgrass.so
%exclude %{_libdir}/libqgisgrass.so.*
%exclude %{_libdir}/qgis/libgrass*
#%%doc BUGS COPYING README
%files devel
%{_includedir}/qgis/*
%files plugin-grass
%{_libdir}/qgis/libgrass*
#%%{_libdir}/libqgisgrass.so
#%%{_libdir}/libqgisgrass.so.*
%defattr(755,root,root)
%{_libdir}/qgis/grass/bin/qgis.g.browser7
%{_libdir}/qgis/grass/modules/qgis.*
%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