2011-06-02 07:40:09 +02:00
|
|
|
|
%define name fcitx
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%define version 4.1.1
|
|
|
|
|
%define release 2
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%define prefix /usr
|
|
|
|
|
%define fcitxbindir /usr/bin
|
|
|
|
|
|
|
|
|
|
Name: %{name}
|
|
|
|
|
Version: %{version}
|
|
|
|
|
Release: %{release}
|
|
|
|
|
Summary: Free Chinese Input Toy for X (XIM)
|
|
|
|
|
URL: http://www.fcitx.org/
|
|
|
|
|
Group: System/I18n/Chinese
|
|
|
|
|
License: GPL
|
2011-09-09 20:59:47 +02:00
|
|
|
|
Source0: %{name}-%{version}_all.tar.bz2
|
2011-06-02 07:40:09 +02:00
|
|
|
|
Source1: %{name}.desktop
|
|
|
|
|
Source2: %{name}-configtool.desktop
|
2011-09-09 20:59:47 +02:00
|
|
|
|
Source3: %{name}-kimpanel.desktop
|
|
|
|
|
Source4: xim.d-fcitx
|
|
|
|
|
Source5: fcitx-README.suse
|
|
|
|
|
Source6: xim.fcitx.suse.template
|
|
|
|
|
BuildRequires: gcc-c++ cmake libicu-devel xorg-x11-libX11-devel
|
2011-06-02 07:40:09 +02:00
|
|
|
|
BuildRequires: cairo-devel
|
|
|
|
|
BuildRequires: pango-devel
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
#patch: catagories.patch
|
2011-09-09 20:59:47 +02:00
|
|
|
|
BuildRequires: dbus-1-devel dbus-1-glib-devel
|
|
|
|
|
Requires: dbus-1 dbus-1-glib
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%else
|
2011-09-09 20:59:47 +02:00
|
|
|
|
BuildRequires: dbus-devel dbus-glib-devel
|
|
|
|
|
Requires: dbus-1 dbus-glib
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%endif
|
|
|
|
|
|
2011-09-09 20:59:47 +02:00
|
|
|
|
Requires: libicu
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%if 0%{?suse_version} >= 1140
|
2011-09-09 20:59:47 +02:00
|
|
|
|
Requires: gtk2-immodule-xim
|
2011-06-02 07:40:09 +02:00
|
|
|
|
#Obsoletes: gtk2-immodule-amharic
|
|
|
|
|
#Obsoletes: gtk2-immodule-thai
|
|
|
|
|
#Obsoletes: gtk2-immodule-vietnamese
|
|
|
|
|
#Obsoletes: gtk2-immodules-tigrigna
|
|
|
|
|
#Obsoletes: gtk2-immodule-inuktitut
|
|
|
|
|
#Obsoletes: gtk2-immodule-multipress
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: intltool
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
#BuildRequires: wget
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
FCITX is a simplified Chinese input server. It supports Tables,
|
|
|
|
|
Pinyin and QuWei input method. It's small and fast.
|
|
|
|
|
|
|
|
|
|
%description -l zh_CN
|
|
|
|
|
Fcitx──小企鹅输入法即Free Chinese Input Toy for X,它是一个以GPL方式
|
|
|
|
|
发布的、基于XIM的简体中文输入法(即原来的G五笔),包括码表、全拼拼音、双拼
|
|
|
|
|
拼音输入法,并可运行在Linux及其它类UNIX平台上。
|
|
|
|
|
Designed by Yuking <yuking_net@suho.com>
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
Requires: xorg-x11-libX11-devel
|
|
|
|
|
%else
|
|
|
|
|
Requires: libX11-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
The %{name}-devel package includes the header files for the FCITX package.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
2011-09-09 20:59:47 +02:00
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake .. -DENABLE_GTK3_IM_MODULE=off -DENABLE_QT_IM_MODULE=off -DENABLE_GTK2_IM_MODULE=off -DCMAKE_INSTALL_PREFIX=%{prefix} -DLIB_INSTALL_DIR=%{_libdir}
|
2011-06-02 07:40:09 +02:00
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
%install
|
2011-09-09 20:59:47 +02:00
|
|
|
|
cd build
|
|
|
|
|
make DESTDIR=%{buildroot} install
|
2011-06-02 07:40:09 +02:00
|
|
|
|
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
|
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/
|
2011-09-09 20:59:47 +02:00
|
|
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/applications/
|
2011-06-14 08:03:57 +02:00
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/
|
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/xim.d-fcitx $RPM_BUILD_ROOT/etc/X11/xim.d/fcitx
|
|
|
|
|
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libfcitx-config.la
|
|
|
|
|
|
|
|
|
|
pushd $RPM_BUILD_ROOT/etc/X11/xim.d/
|
|
|
|
|
for lang in en zh_CN ; do
|
|
|
|
|
mkdir $lang
|
|
|
|
|
pushd $lang
|
|
|
|
|
ln -s ../fcitx 30-fcitx
|
|
|
|
|
popd
|
|
|
|
|
done
|
|
|
|
|
popd
|
2011-06-02 07:40:09 +02:00
|
|
|
|
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
2011-09-09 20:59:47 +02:00
|
|
|
|
#%files -f %{name}.lang
|
|
|
|
|
%files
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc AUTHORS ChangeLog COPYING INSTALL README
|
|
|
|
|
%doc %{_datadir}/doc/fcitx/
|
2011-06-14 08:03:57 +02:00
|
|
|
|
%doc $RPM_SOURCE_DIR/fcitx-README.suse
|
|
|
|
|
%doc $RPM_SOURCE_DIR/xim.fcitx.suse.template
|
|
|
|
|
%dir /etc/X11/xim.d
|
|
|
|
|
%dir /etc/X11/xim.d/en
|
|
|
|
|
%dir /etc/X11/xim.d/zh_CN
|
|
|
|
|
/etc/X11/xim.d/fcitx
|
|
|
|
|
/etc/X11/xim.d/en/30-fcitx
|
|
|
|
|
/etc/X11/xim.d/zh_CN/30-fcitx
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%dir %{_libdir}/fcitx
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%dir %{_datadir}/fcitx
|
|
|
|
|
%dir %{_datadir}/fcitx/data
|
|
|
|
|
%dir %{_datadir}/fcitx/skin
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%dir %{_datadir}/fcitx/addon
|
|
|
|
|
%dir %{_datadir}/fcitx/configdesc
|
|
|
|
|
%dir %{_datadir}/fcitx/pinyin
|
|
|
|
|
%dir %{_datadir}/fcitx/table
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%{_bindir}/*
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%{_datadir}/locale/zh_CN/LC_MESSAGES/fcitx.mo
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%{_datadir}/applications/fcitx*
|
2011-09-09 20:59:47 +02:00
|
|
|
|
#%{_datadir}/pixmaps/*
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%{_datadir}/fcitx/data/*
|
|
|
|
|
%{_datadir}/fcitx/skin/*
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%{_datadir}/fcitx/addon/*
|
|
|
|
|
%{_datadir}/fcitx/configdesc/*
|
|
|
|
|
%{_datadir}/fcitx/pinyin/*
|
|
|
|
|
%{_datadir}/fcitx/table/*
|
|
|
|
|
%{_datadir}/icons/*
|
|
|
|
|
%{_libdir}/fcitx/*.so
|
|
|
|
|
%{_libdir}/libfcitx*.so.*
|
2011-06-02 07:40:09 +02:00
|
|
|
|
%{_mandir}/man1/createPYMB.1.gz
|
|
|
|
|
%{_mandir}/man1/fcitx-remote.1.gz
|
|
|
|
|
%{_mandir}/man1/fcitx.1.gz
|
|
|
|
|
%{_mandir}/man1/mb2org.1.gz
|
|
|
|
|
%{_mandir}/man1/mb2txt.1.gz
|
|
|
|
|
%{_mandir}/man1/readPYBase.1.gz
|
|
|
|
|
%{_mandir}/man1/readPYMB.1.gz
|
|
|
|
|
%{_mandir}/man1/scel2org.1.gz
|
|
|
|
|
%{_mandir}/man1/txt2mb.1.gz
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
%{_includedir}/*
|
2011-09-09 20:59:47 +02:00
|
|
|
|
%{_libdir}/libfcitx*.so
|
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
%{_datadir}/cmake/*
|
2011-06-02 07:40:09 +02:00
|
|
|
|
|
|
|
|
|
%changelog
|