[steam/el7: 2/3] Do not run update-desktop-database on Fedora 25+, add AppStream metadata

Simone Caronni slaanesh at rpmfusion.org
Sat Sep 24 10:18:58 CEST 2016


commit 838f0cb912ef5838981170e33837ab751d44179f
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Sat Sep 24 10:18:21 2016 +0200

    Do not run update-desktop-database on Fedora 25+, add AppStream metadata

 steam.appdata.xml | 38 ++++++++++++++++++++++++++++++++++++++
 steam.spec        | 24 +++++++++++++++++++++---
 2 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/steam.appdata.xml b/steam.appdata.xml
new file mode 100644
index 0000000..ee47ebe
--- /dev/null
+++ b/steam.appdata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+  <id>steam.desktop</id>
+  <name>Steam</name>
+  <summary>Installer for the Steam client</summary>
+  <description>
+    <p>
+      Steam is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networking services. Steam provides the user with installation and automatic updating of games on multiple computers, and community features such as friends lists and groups, cloud saving, and in-game voice and chat functionality.
+    </p>
+    <p>The software provides a freely available application programming interface (API) called Steamworks, which developers can use to integrate many of Steam's functions into their products, including networking, matchmaking, in-game achievements, micro-transactions, and support for user-created content through Steam Workshop.
+    </p>
+  </description>
+  <translation/>
+  <url type="homepage">http://http://store.steampowered.com/</url>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>LicenseRef-proprietary:Steam</project_license>
+  <developer_name>Valve Corporation</developer_name>
+  <keywords>
+    <keyword>Gaming</keyword>
+    <keyword>Valve</keyword>
+    <keyword>Streaming</keyword>
+  </keywords>
+  <update_contact>negativo17 at gmail.com</update_contact>
+  <screenshots>
+    <screenshot type="default">
+      <caption>The main Steam library window</caption>
+      <image type="source" width="1280" height="720">http://negativo17.org/appstream/steam-0.png</image>
+    </screenshot>
+    <screenshot>
+      <caption>Steam Store interface</caption>
+      <image type="source" width="1280" height="720">http://negativo17.org/appstream/steam-1.png</image>
+    </screenshot>
+    <screenshot>
+      <caption>Steam community</caption>
+      <image type="source" width="1280" height="720">http://negativo17.org/appstream/steam-2.png</image>
+    </screenshot>
+  </screenshots>
+</component>
diff --git a/steam.spec b/steam.spec
index bf9355c..02a53da 100644
--- a/steam.spec
+++ b/steam.spec
@@ -6,7 +6,7 @@
 
 Name:           steam
 Version:        1.0.0.52
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Installer for the Steam software distribution service
 # Redistribution and repackaging for Linux is allowed, see license file
 License:        Steam License Agreement
@@ -15,6 +15,7 @@ ExclusiveArch:  i686
 
 Source0:        http://repo.steampowered.com/steam/pool/%{name}/s/%{name}/%{name}_%{version}.tar.gz
 Source3:        %{name}.xml
+Source4:        %{name}.appdata.xml
 
 # Workaround for input devices seen as joysticks (linux kernel bug) and
 # viceversa for the Steam controller:
@@ -121,13 +122,23 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
 install -D -m 644 -p %{SOURCE3} \
     %{buildroot}%{_prefix}/lib/firewalld/services/steam.xml
 
+%if 0%{?fedora} >= 25
+# Install AppData
+mkdir -p %{buildroot}%{_datadir}/appdata
+install -p -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/appdata/
+%endif
+
 %post
 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-%{_bindir}/update-desktop-database &> /dev/null || :
+%if 0%{?fedora} == 24 || 0%{?fedora} == 23 || 0%{?rhel} == 7
+/usr/bin/update-desktop-database &> /dev/null || :
+%endif
 %firewalld_reload
 
 %postun
-%{_bindir}/update-desktop-database &> /dev/null || :
+%if 0%{?fedora} == 24 || 0%{?fedora} == 23 || 0%{?rhel} == 7
+/usr/bin/update-desktop-database &> /dev/null || :
+%endif
 if [ $1 -eq 0 ] ; then
     /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
     %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
@@ -141,6 +152,9 @@ fi
 %license COPYING steam_install_agreement.txt
 %doc README debian/changelog README.Fedora
 %{_bindir}/%{name}
+%if 0%{?fedora} >= 25
+%{_datadir}/appdata/%{name}.appdata.xml
+%endif
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/icons/hicolor/*/apps/%{name}.png
 %{_datadir}/pixmaps/%{name}.png
@@ -151,6 +165,10 @@ fi
 %{_udevrulesdir}/*
 
 %changelog
+* Sat Sep 24 2016 Simone Caronni <negativo17 at gmail.com> - 1.0.0.52-3
+- Do not run update-desktop-database on Fedora 25+.
+- Add AppStream metadata.
+
 * Sat Aug 13 2016 Simone Caronni <negativo17 at gmail.com> - 1.0.0.52-2
 - Make Steam Controller usable as a gamepad (#4062).
 - Update UDev rule for keyboards detected as joysticks.


More information about the rpmfusion-commits mailing list