Blob Blame History Raw
Name:		fcitx-ui-light
Version:	0.1.3
Release:	2%{?dist}
Summary:	Light UI for fcitx
Group:		System Environment/Libraries
License:	GPLv2+
URL:		http://code.google.com/p/fcitx/
Source0:	http://fcitx.googlecode.com/files/%{name}-%{version}.tar.bz2

BuildRequires:	cmake, fcitx-devel, gettext, intltool, libcurl-devel, pkgconfig
BuildRequires:	fontconfig, fontconfig-devel, libXpm-devel, libXft-devel
BuildRequires:	desktop-file-utils
Requires:	fcitx

%description
Light UI is a light-weight user interface for fcitx.


%prep
%setup -q -n %{name}-%{version}


%build
mkdir -pv build
pushd build
%cmake ..
make %{?_smp_mflags} VERBOSE=1

%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
popd

desktop-file-install --delete-original \
  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
  ${RPM_BUILD_ROOT}%{_datadir}/applications/fcitx-light.desktop

cat << EOF > %{name}.lang 
%lang(zh) /usr/share/locale/zh_TW/LC_MESSAGES/fcitx-light-ui.mo
%lang(zh) /usr/share/locale/zh_CN/LC_MESSAGES/fcitx-light-ui.mo
EOF

%post
update-desktop-database %{_datadir}/applications &>/dev/null || :


%postun
update-desktop-database %{_datadir}/applications &>/dev/null || :

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING AUTHORS
%{_datadir}/fcitx/configdesc/*.desc
%{_datadir}/fcitx/addon/*.conf
%{_libdir}/fcitx/*.so
%{_datadir}/applications/fcitx-light.desktop

%changelog
* Sun May 13 2012 Liang Suilong <liangsuilong@gmail.com> - 0.1.3-2
- Fix the spec errors

* Sun Feb 26 2012 Liang Suilong <liangsuilong@gmail.com> - 0.1.3-1
- Initial Package