%global module_name ibus_cangjie
Name: ibus-cangjie
Summary: IBus engine to input Cangjie and Quick
Version: 1.0
Release: 2%{?dist}
License: GPLv3+
URL: http://ibus-cangjie.opensource.hk
Source0: http://ibus-cangjie.opensource.hk/downloads/%{name}/%{name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: desktop-file-utils
BuildRequires: ibus-devel
BuildRequires: intltool
BuildRequires: python3-devel
# For the unit tests
BuildRequires: python3-cangjie
BuildRequires: python3-gobject
Requires: python3-cangjie
Requires: python3-gobject
%description
IBus engine for users of the Cangjie and Quick input methods.
It is primarily intended to Hong Kong people who want to input Traditional
Chinese, as they are (by far) the majority of Cangjie and Quick users.
However, it should work for others as well (e.g to input Simplified Chinese).
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%find_lang %{name}
%check
make check
# Upstream doesn't validate their desktop files
desktop-file-validate %{buildroot}/%{_datadir}/applications/ibus-setup-cangjie.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/ibus-setup-quick.desktop
%files -f %{name}.lang
%doc README COPYING
%{_bindir}/ibus-setup-cangjie
%{python3_sitelib}/%{module_name}
%{_datadir}/applications/ibus-setup-cangjie.desktop
%{_datadir}/applications/ibus-setup-quick.desktop
%{_datadir}/%{name}
%{_datadir}/ibus/component/cangjie.xml
%{_datadir}/ibus/component/quick.xml
# Using %%{_prefix}/lib is allowed here because the package is exempt from
# multilib (because it is noarch), see:
# https://fedoraproject.org/wiki/Packaging:Guidelines#Multilib_Exempt_Locations
%{_prefix}/lib/%{name}
%changelog
* Mon May 06 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 1.0-2
- Comment on the usage of %%{_prefix}/lib
- Validate the desktop file.
* Thu May 02 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 1.0-1
- Initial package for Fedora.