2011-09-13 05:44:06 +02:00
|
|
|
Name: fcitx
|
2011-10-02 22:57:27 +02:00
|
|
|
Version: 4.1.2
|
2011-09-13 05:44:06 +02:00
|
|
|
Release: 1
|
2011-09-13 07:16:43 +02:00
|
|
|
Summary: Free Chinese Input Toy for X
|
2011-09-13 05:44:06 +02:00
|
|
|
Packager: hillwood <hillwood@linuxfans.org>
|
|
|
|
URL: http://www.fcitx.org/
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
License: GPL
|
|
|
|
Source: %{name}-%{version}_all.tar.bz2
|
|
|
|
Source1: xim.d-fcitx
|
|
|
|
Source2: xinput-fcitx.conf
|
2011-09-13 07:16:43 +02:00
|
|
|
Source3: fcitx-README.suse
|
|
|
|
Source4: xim.fcitx.suse.template
|
2011-09-13 05:44:06 +02:00
|
|
|
BuildRequires: cairo-devel
|
2011-06-02 07:40:09 +02:00
|
|
|
BuildRequires: pango-devel
|
|
|
|
%if 0%{?suse_version}
|
2011-09-13 05:44:06 +02:00
|
|
|
BuildRequires: dbus-1-devel
|
|
|
|
BuildRequires: dbus-1-glib-devel
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: libqt4-devel
|
2011-06-02 07:40:09 +02:00
|
|
|
%else
|
2011-09-13 05:44:06 +02:00
|
|
|
BuildRequires: dbus-devel
|
|
|
|
BuildRequires: dbus-glib-devel
|
|
|
|
BuildRequires: qt-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: intltool
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gtk2-devel
|
2011-09-13 07:16:43 +02:00
|
|
|
#If you do not use immodule-fcitx, you have to use immodule-fcitx
|
2011-09-13 05:44:06 +02:00
|
|
|
%if 0%{?suse_version} > 1130
|
2011-09-13 07:16:43 +02:00
|
|
|
Requires: gtk2-immodule-xim, gtk3-immodule-xim
|
2011-09-13 05:44:06 +02:00
|
|
|
BuildRequires: gtk3-devel
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} > 14
|
|
|
|
BuildRequires: gtk3-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libicu-devel
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%description
|
|
|
|
FCITX is a simplified Chinese input server. It supports Tables,
|
|
|
|
Pinyin and QuWei input method. It's small and fast.
|
2011-09-13 05:44:06 +02:00
|
|
|
|
2011-09-13 07:16:43 +02:00
|
|
|
Since version 4.1, FCITX itself can be use as an im-module. XIM
|
|
|
|
can still be used but not necessary.
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%package devel
|
2011-09-13 05:44:06 +02:00
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: fcitx = %{version}-%{release}
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%description devel
|
2011-09-13 05:44:06 +02:00
|
|
|
The %{name}-devel package includes the header files for the %{name} package.
|
|
|
|
|
|
|
|
%package gtk2
|
|
|
|
Summary: Gtk2 IM Module for %{name}
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2011-09-13 07:16:43 +02:00
|
|
|
#XIM is not necessary if using immodule-fcitx.
|
|
|
|
#Requires: gtk2-immodule-xim
|
2011-09-13 05:44:06 +02:00
|
|
|
|
|
|
|
%description gtk2
|
|
|
|
This package contains %{name} im module for gtk2
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1130
|
|
|
|
%package gtk3
|
|
|
|
Summary: Gtk3 IM Module for %{name}
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2011-09-13 07:16:43 +02:00
|
|
|
#XIM is not necessary if using immodule-fcitx.
|
|
|
|
#Requires: gtk3-immodule-xim
|
2011-09-13 05:44:06 +02:00
|
|
|
|
|
|
|
%description gtk3
|
|
|
|
This package contains %{name} im module for gtk3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora} > 14
|
|
|
|
%package gtk3
|
|
|
|
Summary: Gtk3 IM Module for %{name}
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: gtk3-immodule-xim
|
|
|
|
|
|
|
|
%description gtk3
|
|
|
|
This package contains %{name} im module for gtk3
|
|
|
|
%endif
|
2011-09-13 05:49:29 +02:00
|
|
|
Requires: fcitx
|
2011-06-02 07:40:09 +02:00
|
|
|
|
2011-09-13 05:44:06 +02:00
|
|
|
%package qt4
|
|
|
|
Summary: Qt4 IM Module for %{name}
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description qt4
|
|
|
|
This package contains %{name} im module for qt4
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%prep
|
2011-09-13 05:44:06 +02:00
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%build
|
2011-09-09 20:59:47 +02:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2011-06-02 07:40:09 +02:00
|
|
|
|
2011-09-13 05:44:06 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%if 0%{?suse_version} < 1140
|
2011-09-13 07:16:43 +02:00
|
|
|
cmake .. -DENABLE_GTK2_IM_MODULE=On \
|
|
|
|
-DENABLE_GTK3_IM_MODULE=Off \
|
2011-09-13 05:44:06 +02:00
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%else
|
2011-09-13 07:16:43 +02:00
|
|
|
cmake .. -DENABLE_GTK2_IM_MODULE=On \
|
|
|
|
-DENABLE_GTK3_IM_MODULE=On \
|
2011-09-13 05:44:06 +02:00
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%if 0%{?fedora} < 15
|
|
|
|
cmake .. -DENABLE_GTK3_IM_MODULE=off \
|
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%else
|
|
|
|
cmake .. -DENABLE_GTK3_IM_MODULE=On \
|
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if 0%{?centos_version}
|
|
|
|
cmake .. -DENABLE_GTK3_IM_MODULE=off \
|
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%endif
|
|
|
|
%if 0%{?rhel_version}
|
|
|
|
cmake .. -DENABLE_GTK3_IM_MODULE=off \
|
|
|
|
-DENABLE_QT_IM_MODULE=On \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB_INSTALL_DIR=%{_libdir}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
make
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%install
|
2011-09-13 07:16:43 +02:00
|
|
|
#rm -rf $RPM_BUILD_ROOT
|
2011-09-13 05:44:06 +02:00
|
|
|
|
2011-09-09 20:59:47 +02:00
|
|
|
cd build
|
2011-09-13 05:44:06 +02:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
2011-09-13 07:16:43 +02:00
|
|
|
#rm $RPM_BUILD_ROOT/usr/share/doc/ -r
|
2011-09-13 05:44:06 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%suse_update_desktop_file fcitx Utility DesktopUtility
|
|
|
|
%suse_update_desktop_file fcitx-kimpanel Utility DesktopUtility
|
|
|
|
%suse_update_desktop_file fcitx-configtool System SystemSetup
|
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
|
2011-09-13 07:16:43 +02:00
|
|
|
|
|
|
|
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-09-13 05:44:06 +02:00
|
|
|
%else
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/X11/xinit/xinput.d/
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/xinput-fcitx.conf $RPM_BUILD_ROOT/etc/X11/xinit/xinput.d/fcitx.conf
|
|
|
|
%endif
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%find_lang %{name}
|
2011-09-13 07:16:43 +02:00
|
|
|
|
|
|
|
#%fdupes -s %{buildroot}
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%clean
|
|
|
|
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
2011-09-13 05:44:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
|
|
|
%post gtk2
|
|
|
|
touch var/adm/SuSEconfig/run-gtk
|
|
|
|
/sbin/SuSEconfig --module gtk2
|
|
|
|
|
|
|
|
%postun gtk2
|
|
|
|
touch var/adm/SuSEconfig/run-gtk
|
|
|
|
/sbin/SuSEconfig --module gtk2
|
2011-06-02 07:40:09 +02:00
|
|
|
|
2011-09-13 05:44:06 +02:00
|
|
|
%if 0%{?suse_version} > 1130
|
|
|
|
%post gtk3
|
|
|
|
/sbin/ldconfig
|
|
|
|
%ifarch x86_64
|
|
|
|
gtk-query-immodules-3.0-64 > /usr/lib64/gtk-3.0/3.0.0/immodules.cache
|
|
|
|
%else
|
|
|
|
gtk-query-immodules-3.0 > /usr/lib/gtk-3.0/3.0.0/immodules.cache
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
2011-06-02 07:40:09 +02:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS ChangeLog COPYING INSTALL README
|
2011-10-02 22:57:27 +02:00
|
|
|
%{_bindir}/*
|
2011-09-13 05:44:06 +02:00
|
|
|
%{_datadir}/%{name}/addon/*
|
|
|
|
%{_datadir}/%{name}/configdesc/*
|
|
|
|
%{_datadir}/%{name}/data/*
|
|
|
|
%{_datadir}/%{name}/pinyin/*
|
|
|
|
%{_datadir}/%{name}/table/*
|
2011-09-13 07:16:43 +02:00
|
|
|
%{_datadir}/doc/%{name}/
|
2011-09-13 05:44:06 +02:00
|
|
|
%{_datadir}/applications/*.desktop
|
|
|
|
%{_datadir}/icons/*
|
2011-10-02 22:57:27 +02:00
|
|
|
%{_datadir}/mime/packages/*
|
2011-09-13 05:44:06 +02:00
|
|
|
%{_mandir}/man1/*.gz
|
2011-09-09 20:59:47 +02:00
|
|
|
%dir %{_datadir}/fcitx/addon
|
|
|
|
%dir %{_datadir}/fcitx/configdesc
|
2011-09-13 05:44:06 +02:00
|
|
|
%dir %{_datadir}/fcitx/data
|
2011-09-09 20:59:47 +02:00
|
|
|
%dir %{_datadir}/fcitx/pinyin
|
|
|
|
%dir %{_datadir}/fcitx/table
|
2011-09-13 05:44:06 +02:00
|
|
|
%dir %{_libdir}/fcitx
|
|
|
|
%dir %{_datadir}/fcitx
|
2011-09-09 20:59:47 +02:00
|
|
|
%{_libdir}/fcitx/*.so
|
|
|
|
%{_libdir}/libfcitx*.so.*
|
2011-09-13 05:44:06 +02:00
|
|
|
%{_bindir}/createPYMB
|
|
|
|
%{_bindir}/mb2org
|
|
|
|
%{_bindir}/mb2txt
|
|
|
|
%{_bindir}/readPYBase
|
|
|
|
%{_bindir}/readPYMB
|
|
|
|
%{_bindir}/scel2org
|
|
|
|
%{_bindir}/txt2mb
|
|
|
|
%dir %{_datadir}/%{name}/skin
|
|
|
|
%{_datadir}/%{name}/skin/default
|
|
|
|
%{_datadir}/%{name}/skin/dark
|
|
|
|
%{_datadir}/%{name}/skin/classic
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%dir /etc/X11/xim.d
|
2011-09-13 07:16:43 +02:00
|
|
|
%dir /etc/X11/xim.d/en
|
|
|
|
%dir /etc/X11/xim.d/zh_CN
|
2011-09-13 05:44:06 +02:00
|
|
|
/etc/X11/xim.d/*
|
|
|
|
%else
|
|
|
|
%dir /etc/X11/xinit/xinput.d
|
|
|
|
/etc/X11/xinit/xinput.d/fcitx.conf
|
|
|
|
%endif
|
2011-06-02 07:40:09 +02:00
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
2011-09-13 05:44:06 +02:00
|
|
|
%files gtk2
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-2.0/*
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1130
|
|
|
|
%files gtk3
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-3.0/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora} > 14
|
|
|
|
%files gtk3
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-3.0/*
|
|
|
|
%endif
|
|
|
|
|
2011-06-02 07:40:09 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
2011-09-09 20:59:47 +02:00
|
|
|
%{_libdir}/libfcitx*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2011-09-13 05:44:06 +02:00
|
|
|
%{_datadir}/cmake/
|
|
|
|
%{_includedir}/*
|
|
|
|
|
|
|
|
%files qt4
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/qt4/*
|
2011-06-02 07:40:09 +02:00
|
|
|
|
|
|
|
%changelog
|