rdieter pushed to kajongg (master). "fix appdata install"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 16 16:45:02 UTC 2015
>From 7553cff09119c30bb65b3146e13cfddee9eefc99 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Thu, 16 Apr 2015 11:44:47 -0500
Subject: fix appdata install
diff --git a/0001-install-appdata-to-the-right-place.patch b/0001-install-appdata-to-the-right-place.patch
new file mode 100644
index 0000000..c58ffec
--- /dev/null
+++ b/0001-install-appdata-to-the-right-place.patch
@@ -0,0 +1,25 @@
+From cd10df9ef8980a6ee76d3ced1a1bee81b4d2b5e2 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Thu, 16 Apr 2015 11:37:34 -0500
+Subject: [PATCH] install appdata to the right place
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b217c8..2146806 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -111,7 +111,7 @@ IF(INSTALL_KAJONGG)
+ PYKDE4_ADD_EXECUTABLE(kajonggserver.py kajonggserver)
+ kde4_install_icons(${ICON_INSTALL_DIR})
+ install(PROGRAMS kajongg.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+- install(FILES kajongg.appdata.xml DESTINATION ${DATA_INSTALL_DIR}/appdata)
++ install(FILES kajongg.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata)
+ ENDIF(INSTALL_KAJONGG)
+
+ macro_display_feature_log()
+--
+2.3.5
+
diff --git a/kajongg.spec b/kajongg.spec
index 6e8f6ae..8875b4e 100644
--- a/kajongg.spec
+++ b/kajongg.spec
@@ -15,12 +15,18 @@ URL: https://projects.kde.org/projects/kde/kdegames/%{name}
Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz
BuildArch: noarch
+## upstream patches
+Patch1: 0001-install-appdata-to-the-right-place.patch
+
BuildRequires: kdelibs4-devel >= 4.14
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pykde4-devel
BuildRequires: python-devel
BuildRequires: python-twisted-core
+%if 0%{?fedora} > 19
+BuildRequires: libappstream-glib
+%endif
Requires: pykde4
Requires: python-twisted-core
@@ -38,6 +44,8 @@ of other human players or computer players.
%prep
%setup -q
+%patch1 -p1 -b .0001
+
%build
mkdir %{_target_platform}
@@ -52,45 +60,11 @@ make %{?_smp_mflags} -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
-# Register as an application to be visible in the software center
-#
-# NOTE: It would be *awesome* if this file was maintained by the upstream
-# project, translated and installed into the right place during `make install`.
-#
-# See http://www.freedesktop.org/software/appstream/docs/ for more details.
-#
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
-cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-BugReportURL: https://bugs.kde.org/show_bug.cgi?id=339366
-SentUpstream: 2014-09-24
--->
-<component type="desktop">
- <id>kajongg.desktop</id>
- <metadata_license>CC0-1.0</metadata_license>
- <summary>Mah Jongg Puzzle Game</summary>
- <description>
- <p>
- Mah Jongg board game for KDE.
- Can be played against up to four players (human or computer) or solo.
- </p>
- </description>
- <url type="homepage">http://www.kde.org/applications/games/kajongg/</url>
- <screenshots>
- <screenshot type="default">
- <image>http://www.kde.org/images/screenshots/kajongg.png</image>
- </screenshot>
- </screenshots>
- <project_group>KDE</project_group>
- <developer_name>KDE e.V.</developer_name>
-</component>
-EOF
-
%find_lang %{name} --with-kde
%check
+appstream-util validate-relax --nonet %{buildroot}%{_kde4_datadir}/appdata/%{name}.appdata.xml ||:
desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/kajongg.git/commit/?h=master&id=7553cff09119c30bb65b3146e13cfddee9eefc99
More information about the scm-commits
mailing list