Skip to content

Commit

Permalink
[RPM] Add support for GRASS8 for F36+
Browse files Browse the repository at this point in the history
  • Loading branch information
daniviga authored and nyalldawson committed Feb 27, 2022
1 parent 8218379 commit 0e05ca1
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions rpm/qgis.spec.template
Expand Up @@ -12,16 +12,7 @@
# py files located under /usr/share/qgis/python/plugins
%global __python %{__python3}

# SPEC do not support elseif until very recent releases
%if 0%{?fedora} >= 31
%define grass grass78
%endif
%if 0%{?fedora} == 30
%define grass grass76
%endif
%if 0%{?fedora} < 30
%define grass grass74
%endif
%define grass_prefix $(pkg-config --variable=prefix grass)

%if %{_timestamp} > 0
# Epoch is set only when building packages from master
Expand Down Expand Up @@ -130,14 +121,7 @@ BuildRequires: qt5-qtwebkit-devel
BuildRequires: qtkeychain-qt5-devel
BuildRequires: qt5-qtserialport-devel
BuildRequires: qt5-qt3d-devel

# In F30+ qt5-qtbase-devel has been split
# in qt5-qtbase-devel and qt5-qtbase-private-devel
# qt5-qtbase-private-devel is needed by
# external/qspatialite/qsql_spatialite.cpp:49:10
%if 0%{?fedora} >= 30
BuildRequires: qt5-qtbase-private-devel
%endif

# Qwt stuff
BuildRequires: qwt-devel
Expand Down Expand Up @@ -182,28 +166,19 @@ Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
# WARNING: Rebuild QGIS whenever a new version of GRASS is shipped! Even though
# the soname might stay the same, it won't work anymore.
# https://github.com/qgis/QGIS/issues/14999
Requires: grass%{?_isa} = %{grass_version}
Requires: grass%{?_isa}

%description grass
GRASS plugin for QGIS required to interface with the GRASS system.

%package -n python3-qgis
%{?python_provide:%python_provide python3-qgis}
# Remove before F30
Provides: %{name}-python = %{combinedversion}-%{release}
Provides: %{name}-python%{?_isa} = %{combinedversion}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Obsoletes: python2-%{name} < %{version}-%{release}
Summary: Python integration and plug-ins for QGIS
Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
Requires: gdal-python3
# Starting from Fedora 30 python2-gdal package
# has been renamed to gdal-python-tools
%if 0%{?fedora} >= 30
Requires: gdal-python-tools
%else
Requires: python2-gdal
%endif
Requires: python3-future
Requires: python3-jinja2
Requires: python3-OWSLib
Expand Down Expand Up @@ -255,6 +230,11 @@ gzip ChangeLog
-D QGIS_CGIBIN_SUBDIR=%{_libexecdir}/%{name} \
-D WITH_BINDINGS:BOOL=TRUE \
-D WITH_GRASS7:BOOL=TRUE \
%if 0%{?fedora} >= 36
-D GRASS_PREFIX8= %{grass_prefix} \
%else
-D GRASS_PREFIX7= %{grass_prefix} \
%endif
-D GRASS_PREFIX7=%{_libdir}/%{grass} \
-D WITH_CUSTOM_WIDGETS:BOOL=TRUE \
-D BINDINGS_GLOBAL_INSTALL:BOOL=TRUE \
Expand Down

0 comments on commit 0e05ca1

Please sign in to comment.