Skip to content

Commit 1ea7699

Browse files
committedFeb 1, 2019
[RPM] Backport some fixes for master, add F30+ compatibility
1 parent 20cd215 commit 1ea7699

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed
 

‎rpm/qgis.spec.template

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@
1212
# py files located under /usr/share/qgis/python/plugins
1313
%global __python %{__python3}
1414

15+
%if 0%{?fedora} >= 30
16+
%define grass grass76
17+
%else
18+
%define grass grass74
19+
%endif
20+
1521
%if %{_timestamp} > 0
1622
# Epoch is set only when building packages from master
1723
Epoch: %{_timestamp}
24+
%define combinedversion %{epoch}:%{version}
1825
%define builddate %(date -d @%{_timestamp} '+%a %b %d %Y')
1926
%else
27+
%define combinedversion %{version}
2028
%define builddate %(date '+%a %b %d %Y')
2129
%endif
2230

23-
%define grass grass74
24-
2531
Name: qgis
2632
Version: %{_version}
2733
Release: %{_relver}%{?dist}
@@ -64,10 +70,13 @@ BuildRequires: spatialindex-devel
6470
BuildRequires: grass-devel
6571

6672
# Other stuff
73+
BuildRequires: exiv2-devel
6774
BuildRequires: gsl-devel
6875
BuildRequires: libzip-devel
6976
BuildRequires: postgresql-devel
7077
BuildRequires: sqlite-devel
78+
BuildRequires: hdf5-devel
79+
BuildRequires: netcdf-devel
7180
BuildRequires: fcgi-devel
7281

7382
# OpenCL
@@ -130,14 +139,14 @@ and USGS ASCII DEM.
130139

131140
%package devel
132141
Summary: Development Libraries for the QGIS
133-
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
142+
Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
134143

135144
%description devel
136145
Development packages for QGIS including the C header files.
137146

138147
%package grass
139148
Summary: GRASS Support Libraries for QGIS
140-
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
149+
Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
141150

142151
# The plug-in requires more than just the grass-libs.
143152
# This questions the sense of the libs package.
@@ -152,12 +161,12 @@ GRASS plugin for QGIS required to interface with the GRASS system.
152161
%package -n python3-qgis
153162
%{?python_provide:%python_provide python3-qgis}
154163
# Remove before F30
155-
Provides: %{name}-python = %{version}-%{release}
156-
Provides: %{name}-python%{?_isa} = %{version}-%{release}
164+
Provides: %{name}-python = %{combinedversion}-%{release}
165+
Provides: %{name}-python%{?_isa} = %{combinedversion}-%{release}
157166
Obsoletes: %{name}-python < %{version}-%{release}
158167
Obsoletes: python2-%{name} < %{version}-%{release}
159168
Summary: Python integration and plug-ins for QGIS
160-
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
169+
Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
161170
Requires: gdal-python3
162171
Requires: python3-future
163172
Requires: python3-jinja2
@@ -175,7 +184,7 @@ Python integration and plug-ins for QGIS.
175184

176185
%package server
177186
Summary: FCGI-based OGC web map server
178-
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
187+
Requires: %{name}%{?_isa} = %{combinedversion}-%{release}
179188
Requires: mod_fcgid
180189
Provides: mapserver = %{version}-%{release}
181190
Obsoletes: mapserver < 2.8.1-1
@@ -244,6 +253,8 @@ rm -f %{buildroot}%{_datadir}/%{name}/doc/INSTALL*
244253

245254
%find_lang %{name} --with-qt
246255

256+
# TODO: Remove after F28 EoL
257+
# Ref: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
247258
%post
248259
/sbin/ldconfig
249260
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@@ -269,6 +280,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
269280
%post -n python3-qgis -p /sbin/ldconfig
270281

271282
%postun -n python3-qgis -p /sbin/ldconfig
283+
# END TODO #
272284

273285
%files -f %{name}.lang
274286
%doc BUGS NEWS Exception_to_GPL_for_Qt.txt ChangeLog.gz

0 commit comments

Comments
 (0)
Please sign in to comment.