Register as an AppStream component

This commit is contained in:
Richard Hughes 2015-03-26 09:45:19 +00:00
parent 4428a9136d
commit 27cc15f496

View File

@ -1,6 +1,6 @@
Name: ibus-typing-booster
Version: 1.2.11
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A typing booster engine for the IBus platform
License: GPLv3+
Group: System Environment/Libraries
@ -31,6 +31,41 @@ make %{?_smp_mflags}
export PYTHON=%{__python3}
make install DESTDIR=${RPM_BUILD_ROOT} NO_INDEX=true INSTALL="install -p" pkgconfigdir=%{_datadir}/pkgconfig
# Register as an AppStream component 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/typing-booster.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="inputmethod">
<id>typing-booster.xml</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Typing Booster</name>
<summary>Predictive input method</summary>
<description>
<p>
Ibus-Typing Booster is a predictive input method and predicts complete words
based on partial input.
One can then simply select the desired word from a list of suggestions and
improve one's typing speed and spelling.
</p>
<p>
Input methods are typing systems allowing users to input complex languages.
They are necessary because these contain too many characters to simply be laid
out on a traditional keyboard.
</p>
</description>
<url type="homepage">https://code.google.com/p/ibus/</url>
<url type="bugtracker">https://code.google.com/p/ibus/issues/list</url>
<url type="help">https://code.google.com/p/ibus/wiki/FAQ</url>
<update_contact><!-- upstream-contact_at_email.com --></update_contact>
</component>
EOF
%find_lang %{name}
%check
@ -48,6 +83,7 @@ desktop-file-validate \
%files -f %{name}.lang
%doc AUTHORS COPYING README
%{_datadir}/%{name}
%{_datadir}/appdata/*.appdata.xml
%{_datadir}/ibus/component/typing-booster.xml
%{_libexecdir}/ibus-engine-typing-booster
%{_libexecdir}/ibus-setup-typing-booster
@ -55,6 +91,9 @@ desktop-file-validate \
%{_datadir}/applications/ibus-setup-typing-booster.desktop
%changelog
* Wed Mar 25 2015 Richard Hughes <rhughes@redhat.com> - 1.2.11-2
- Register as an AppStream component.
* Wed Sep 24 2014 Mike FABIAN <mfabian@redhat.com> - 1.2.11-1
- Require Python >= 3.3
- Always write xml output in UTF-8 encoding, not in the encoding of the current locale