[GRASS-SVN] r72190 - grass/trunk/rpm

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 28 12:56:20 PST 2018


Author: neteler
Date: 2018-01-28 12:56:20 -0800 (Sun, 28 Jan 2018)
New Revision: 72190

Modified:
   grass/trunk/rpm/grass.spec
Log:
rpm/grass.spec: SPEC cleanup as per external review in https://bugzilla.redhat.com/show_bug.cgi?id=1539116

Modified: grass/trunk/rpm/grass.spec
===================================================================
--- grass/trunk/rpm/grass.spec	2018-01-28 20:54:23 UTC (rev 72189)
+++ grass/trunk/rpm/grass.spec	2018-01-28 20:56:20 UTC (rev 72190)
@@ -6,7 +6,9 @@
 Release:	1%{?dist}
 Summary:	GRASS GIS - Geographic Resources Analysis Support System
 
+%if 0%{?rhel}
 Group:		Applications/Engineering
+%endif
 License:	GPLv2+
 URL:		https://grass.osgeo.org
 Source0:	https://grass.osgeo.org/%{name}%{shortver}/source/%{name}-%{version}.tar.gz
@@ -89,7 +91,7 @@
 %global cpuarch 64
 %endif
 
-Requires:	%{name}%{?isa}-libs = %{version}-%{release}
+Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
 
 %description
 GRASS (Geographic Resources Analysis Support System) is a Geographic
@@ -109,7 +111,6 @@
 %package gui
 Summary:	GRASS GIS GUI
 Group:		Applications/Engineering
-Requires:	%{name}%{?isa}-libs = %{version}-%{release}
 Requires:	%{name}%{?isa} = %{version}-%{release}
 
 %description gui
@@ -118,7 +119,7 @@
 %package devel
 Summary:	GRASS GIS development headers
 Group:		Applications/Engineering
-Requires:	%{name}%{?isa}-libs = %{version}-%{release}
+Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
 
 %description devel
 GRASS GIS development headers
@@ -244,36 +245,41 @@
 # append shortver to destination ? man pages are unversioned
 ln -s %{_libdir}/%{name}-%{version}/docs %{buildroot}%{_docdir}/%{name}%{shortver}
 
-for file in infrastructure.txt ; do
-  iconv -f ISO-8859-1 -t UTF-8 $file > ${file}.tmp && mv -f ${file}.tmp $file
-done
-
 # Make desktop, appdata and icon files available on the system
 mv %{buildroot}%{_libdir}/%{name}-%{version}/share/* %{buildroot}%{_datadir}
 desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
 # EPEL7 fails on url tag, so we ignore failure:
-appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml || echo "Ignoring appstream-util failure"
+appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}*.appdata.xml || echo "Ignoring appstream-util failure"
+# as per https://fedoraproject.org/wiki/Packaging:AppData
+mkdir -p %{buildroot}%{_datadir}/metainfo/
+cp %{buildroot}/%{_datadir}/appdata/%{name}*.appdata.xml %{buildroot}%{_datadir}/metainfo/
 
 # Cleanup: nothing to do
 #rm -rf %%{buildroot}%%{_prefix}/%%{name}-%%{version}
 
-# rpm macro for version checking
+# rpm macro for version checking (not from buildroot!)
 mkdir -p ${RPM_BUILD_ROOT}%{macrosdir}
 cat > ${RPM_BUILD_ROOT}%{macrosdir}/macros.%{name} <<EOF
 %%%{name}_version %{version}
 EOF
 
 %post
+%if 0%{?rhel}
 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+%endif
 
 %postun
+%if 0%{?rhel}
 if [ $1 -eq 0 ] ; then
 	/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
 	/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
+%endif
 
 %posttrans
+%if 0%{?rhel}
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+%endif
 
 %post libs -p /sbin/ldconfig
 
@@ -289,6 +295,7 @@
 %{_datadir}/appdata/*
 %{_datadir}/applications/*
 %{_datadir}/icons/hicolor/*/apps/*
+%{_datadir}/metainfo/
 %{_mandir}/man1/*
 %{_docdir}/%{name}%{shortver}
 
@@ -312,6 +319,9 @@
 %{_libdir}/%{name}-%{version}/include
 
 %changelog
+* Sun Jan 28 2018 Markus Neteler <neteler at mundialis.de> - 7.4.0-2
+- SPEC cleanup as per review in https://bugzilla.redhat.com/show_bug.cgi?id=1539116
+
 * Mon Jan 15 2018 Markus Metz <metz at mundialis.de> - 7.4.0-1
 - New upstream version 7.4.0
 - Fix grass-devel which needs include/grass and include/Make dirs



More information about the grass-commit mailing list