Skip to content

Commit

Permalink
Merge pull request #5450 from daniviga/rpm-fix-epoch
Browse files Browse the repository at this point in the history
Fix 'epoch' management in rpm spec
  • Loading branch information
m-kuhn committed Oct 26, 2017
2 parents 861e05b + 0677748 commit dc32514
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rpm/buildrpms.sh
Expand Up @@ -90,7 +90,7 @@ then
let relver+=1 let relver+=1
echo "relver=$relver" > version.cfg echo "relver=$relver" > version.cfg
fi fi
timestamp=1 timestamp=0
else else
relver="git$(git rev-parse --short HEAD)" relver="git$(git rev-parse --short HEAD)"
timestamp=$(date +'%s') timestamp=$(date +'%s')
Expand Down
18 changes: 12 additions & 6 deletions rpm/qgis.spec.template
Expand Up @@ -6,6 +6,12 @@
# - _relver # - _relver
# - _timestamp (optional) # - _timestamp (optional)


%if %{_timestamp} > 0
%define builddate %(date -d @%{_timestamp} '+%a %b %d %Y')
%else
%define builddate %(date '+%a %b %d %Y')
%endif

Name: qgis Name: qgis
Version: %{_version} Version: %{_version}
Release: %{_relver}%{?dist} Release: %{_relver}%{?dist}
Expand All @@ -15,7 +21,7 @@ Group: Applications/Engineering
License: GPLv3+ with exceptions License: GPLv3+ with exceptions
URL: http://www.qgis.org URL: http://www.qgis.org


# Epoch is used when building packages from master, otherwise is set to 1 # Epoch is used when building packages from master, otherwise is set to 0
Epoch: %{_timestamp} Epoch: %{_timestamp}


Source0: http://qgis.org/downloads/%{name}-%{version}.tar.bz2 Source0: http://qgis.org/downloads/%{name}-%{version}.tar.bz2
Expand Down Expand Up @@ -113,15 +119,15 @@ and USGS ASCII DEM.
%package devel %package devel
Summary: Development Libraries for the QGIS Summary: Development Libraries for the QGIS
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}


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


%package grass %package grass
Summary: GRASS Support Libraries for QGIS Summary: GRASS Support Libraries for QGIS
Group: Applications/Engineering Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}


# The plug-in requires more than just the grass-libs. # The plug-in requires more than just the grass-libs.
# This questions the sense of the libs package. # This questions the sense of the libs package.
Expand All @@ -141,7 +147,7 @@ Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python integration and plug-ins for QGIS Summary: Python integration and plug-ins for QGIS
Group: Applications/Engineering Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: gdal-python3 Requires: gdal-python3
Requires: python3-future Requires: python3-future
Requires: python3-jinja2 Requires: python3-jinja2
Expand All @@ -160,7 +166,7 @@ Python integration and plug-ins for QGIS.
%package server %package server
Summary: FCGI-based OGC web map server Summary: FCGI-based OGC web map server
Group: Applications/Engineering Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: mod_fcgid Requires: mod_fcgid
Provides: mapserver = %{version}-%{release} Provides: mapserver = %{version}-%{release}
Obsoletes: mapserver < 2.8.1-1 Obsoletes: mapserver < 2.8.1-1
Expand Down Expand Up @@ -366,5 +372,5 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :




%changelog %changelog
* %(date -d @%{_timestamp} '+%a %b %d %Y') Daniele Viganò <daniele@vigano.me> %{_version}-%{_relver} * %{builddate} Daniele Viganò <daniele@vigano.me> %{_version}-%{_relver}
- Automatic build - Automatic build

0 comments on commit dc32514

Please sign in to comment.