rdieter pushed to kollision (master). "kf5-ize, separate out (upstreamable) appdata"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sat Apr 18 14:59:47 UTC 2015
>From 3803480ab57f853081e6c60f1a4c365d3c98187c Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Sat, 18 Apr 2015 09:59:24 -0500
Subject: kf5-ize, separate out (upstreamable) appdata
diff --git a/kollision.spec b/kollision.spec
index 078e891..fd1134a 100644
--- a/kollision.spec
+++ b/kollision.spec
@@ -14,11 +14,38 @@ URL: https://projects.kde.org/projects/kde/kdegames/%{name}
%endif
Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz
+## upstreamable
+Source1: org.kde.kollision.appdata.xml
+
+BuildRequires: cmake
BuildRequires: desktop-file-utils
+BuildRequires: extra-cmake-modules
+BuildRequires: gettext
+BuildRequires: kf5-rpm-macros
+BuildRequires: kf5-kcompletion-devel
+BuildRequires: kf5-kconfig-devel
+BuildRequires: kf5-kconfigwidgets-devel
+BuildRequires: kf5-kcoreaddons-devel
+BuildRequires: kf5-kdbusaddons-devel
+BuildRequires: kf5-kdeclarative-devel
+BuildRequires: kf5-kguiaddons-devel
+BuildRequires: kf5-ki18n-devel
+BuildRequires: kf5-kiconthemes-devel
+BuildRequires: kf5-kitemviews-devel
+BuildRequires: kf5-kio-devel
+BuildRequires: kf5-kjobwidgets-devel
+BuildRequires: kf5-knewstuff-devel
+BuildRequires: kf5-knotifyconfig-devel
+BuildRequires: kf5-knewstuff-devel
+BuildRequires: kf5-kservice-devel
+BuildRequires: kf5-kwindowsystem-devel
+BuildRequires: kf5-kwidgetsaddons-devel
+BuildRequires: kf5-kxmlgui-devel
+BuildRequires: pkgconfig(phonon4qt5)
+BuildRequires: pkgconfig(Qt5Widgets) pkgconfig(Qt5Qml) pkgconfig(Qt5Quick) pkgconfig(Qt5QuickWidgets) pkgconfig(Qt5Svg) pkgconfig(Qt5Test)
+BuildRequires: libappstream-glib
BuildRequires: libkdegames-devel >= %{version}
-Requires: libkdegames%{?_isa} >= %{version}
-
%description
Kollision is a simple ball dodging game. Let the blue ball
move in the field without touching the red balls.
@@ -29,9 +56,9 @@ move in the field without touching the red balls.
%build
-mkdir -p %{_target_platform}
+mkdir %{_target_platform}
pushd %{_target_platform}
-%{cmake_kde4} ..
+%{cmake_kf5} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
@@ -40,72 +67,39 @@ 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"?>
-<!-- Copyright 2014 Edgar Muniz Berlinck <edgar.vv at gmail.com> -->
-<!--
-EmailAddress: wolfgang at rohdewald.de
-SentUpstream: 2014-09-24
--->
-<component type="desktop">
- <id>kollision.desktop</id>
- <metadata_license>CC0-1.0</metadata_license>
- <summary>Casual ball game</summary>
- <description>
- <p>
- Kollision is a casual game where you need to throw your ball and avoid the
- others balls on the table as long as possible.
- </p>
- </description>
- <url type="homepage">https://projects.kde.org/projects/kde/kdegames/kollision</url>
- <screenshots>
- <screenshot type="default">
- <image>http://games.kde.org/games/kollision/screenshots/originals/kollision01.jpg</image>
- </screenshot>
- </screenshots>
-</component>
-EOF
-
-%find_lang %{name} --with-kde
-
+install -p -D %{SOURCE1} %{buildroot}%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml
%check
-desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop
+appstream-util validate-relax --nonet %{buildroot}%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml ||:
+desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.%{name}.desktop ||:
%post
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
-touch --no-create %{_kde4_iconsdir}/oxygen &> /dev/null || :
+touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null
-touch --no-create %{_kde4_iconsdir}/oxygen &> /dev/null || :
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
-gtk-update-icon-cache %{_kde4_iconsdir}/oxygen &> /dev/null || :
+touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null
+gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
fi
%posttrans
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
-gtk-update-icon-cache %{_kde4_iconsdir}/oxygen &> /dev/null || :
-
+gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
-%files -f %{name}.lang
+%files
%doc COPYING*
-%{_kde4_bindir}/%{name}
-%{_kde4_datadir}/appdata/%{name}.appdata.xml
-%{_kde4_datadir}/applications/kde4/%{name}.desktop
-%{_kde4_iconsdir}/hicolor/*/*/*
-%{_kde4_iconsdir}/oxygen/*/*/*
-%{_kde4_appsdir}/%{name}/
+#doc README
+%{_kf5_bindir}/%{name}
+#{_sysconfdir}/xdg/%{name}.knsrc
+%{_kf5_datadir}/applications/org.kde.%{name}.desktop
+%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml
+%{_kf5_datadir}/icons/hicolor/*/apps/%{name}.*
+%{_kf5_datadir}/%{name}/
+%{_kf5_docdir}/HTML/en/%{name}/
+#{_kf5_datadir}/kconf_update/%{name}*
+%{_kf5_datadir}/kxmlgui5/%{name}/
+#{_kf5_datadir}/sounds/%{name}/
+#{_kf5_datadir}/config.kcfg/%{name}.kcfg
%changelog
diff --git a/org.kde.kollision.appdata.xml b/org.kde.kollision.appdata.xml
new file mode 100644
index 0000000..6e40e1a
--- /dev/null
+++ b/org.kde.kollision.appdata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Edgar Muniz Berlinck <edgar.vv at gmail.com> -->
+<!--
+ EmailAddress: wolfgang at rohdewald.de
+SentUpstream: 2014-09-24
+-->
+<component type="desktop">
+ <id>org.kde.kollision.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <summary>Casual ball game</summary>
+ <description>
+ <p>
+ Kollision is a casual game where you need to throw your ball and avoid the
+ others balls on the table as long as possible.
+ </p>
+ </description>
+ <url type="homepage">https://projects.kde.org/projects/kde/kdegames/kollision</url>
+ <screenshots>
+ <screenshot type="default">
+ <image>http://games.kde.org/games/kollision/screenshots/originals/kollision01.jpg</image>
+ </screenshot>
+ </screenshots>
+</component>
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/kollision.git/commit/?h=master&id=3803480ab57f853081e6c60f1a4c365d3c98187c
More information about the scm-commits
mailing list