diff --git a/README.md b/README.md deleted file mode 100644 index 7b704b230dc5c44f6b27ee54fda8d2ed3f070ba2..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# fcitx - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/fcitx-4.2.9.7_dict.tar.xz b/fcitx-4.2.9.7_dict.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..f30d5b0be96c8248f9b329c324e9104b7d674562 Binary files /dev/null and b/fcitx-4.2.9.7_dict.tar.xz differ diff --git a/fcitx.spec b/fcitx.spec new file mode 100755 index 0000000000000000000000000000000000000000..3e3dda60a9699587631ba8e333f6a23e0dfe48eb --- /dev/null +++ b/fcitx.spec @@ -0,0 +1,196 @@ +%global _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/fcitx.conf +%{!?gtk2_binary_version: %global gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)} +%{!?gtk3_binary_version: %global gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)} + +Name: fcitx +Summary: An input method framework +Version: 4.2.9.7 +Release: 1 +License: GPLv2+ +URL: https://fcitx-im.org/wiki/Fcitx +Source0: http://download.fcitx-im.org/fcitx/%{name}-%{version}_dict.tar.xz +Source1: xinput-%{name} +BuildRequires: gcc-c++, pango-devel, dbus-devel, opencc-devel, wget, intltool, chrpath, opencc, cmake, libtool, doxygen, libicu-devel +BuildRequires: qt4-devel, gtk3-devel, gtk2-devel, libicu, xorg-x11-proto-devel, xorg-x11-xtrans-devel, gobject-introspection-devel, libxkbfile-devel, enchant-devel, iso-codes-devel, libicu-devel +BuildRequires: libX11-devel, dbus-glib-devel, dbus-x11, desktop-file-utils, libxml2-devel, lua-devel, extra-cmake-modules, xkeyboard-config-devel, libuuid-devel, json-c-devel +Requires: imsettings, imsettings-gnome, hicolor-icon-theme, dbus +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires(post): %{_sbindir}/alternatives +Requires(postun): %{_sbindir}/alternatives + +%description +Fcitx is an input method framework with extension support. Currently it +supports Linux and Unix systems like FreeBSD. + +Fcitx tries to provide a native feeling under all desktop as well as a light +weight core. You can easily customize it to fit your requirements. + +%package libs +Summary: Shared libraries for Fcitx +Provides: %{name}-keyboard = %{version}-%{release} +Obsoletes: %{name}-keyboard =< 4.2.3 + +%description libs +The %{name}-libs package provides shared libraries for Fcitx + +%package devel +Summary: Development files for Fcitx +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: libX11-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and header files necessary for +developing programs using Fcitx libraries. + + +%prep +%setup -q + +%build +mkdir -p build +pushd build +%cmake .. -DENABLE_GTK3_IM_MODULE=On -DENABLE_QT_IM_MODULE=On -DENABLE_OPENCC=On -DENABLE_LUA=On -DENABLE_GIR=On -DENABLE_XDGAUTOSTART=Off +make VERBOSE=1 %{?_smp_mflags} + +%install +%make_install INSTALL="install -p" -C build + +find %{buildroot}%{_libdir} -name '*.la' -delete -print + +install -pm 644 -D %{SOURCE1} %{buildroot}%{_xinputconf} + +# patch fcitx4-config to use pkg-config to solve libdir to avoid multiarch +# confilict +sed -i -e 's:%{_libdir}:`pkg-config --variable=libdir fcitx`:g' \ + %{buildroot}%{_bindir}/fcitx4-config + +chmod +x %{buildroot}%{_datadir}/%{name}/data/env_setup.sh + +%find_lang %{name} + +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/%{name}-skin-installer.desktop + +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/%{name}-configtool.desktop + +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/%{name}.desktop + +%post +%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 55 || : + +%postun +if [ "$1" = "0" ]; then + %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || : + # if alternative was set to manual, reset to auto + [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || : +fi + +%ldconfig_scriptlets libs + + +%files -f %{name}.lang +%doc AUTHORS ChangeLog THANKS TODO +%license COPYING +%{_bindir}/createPYMB +%{_bindir}/fcitx +%{_bindir}/fcitx-* +%{_bindir}/mb2org +%{_bindir}/mb2txt +%{_bindir}/readPYBase +%{_bindir}/readPYMB +%{_bindir}/scel2org +%{_bindir}/txt2mb +%config %{_xinputconf} +%{_datadir}/applications/%{name}-configtool.desktop +%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/%{name}-skin-installer.desktop +%{_datadir}/dbus-1/services/org.fcitx.Fcitx.service +%{_datadir}/icons/hicolor/128x128/apps/*.png +%{_datadir}/icons/hicolor/16x16/apps/*.png +%{_datadir}/icons/hicolor/22x22/apps/*.png +%{_datadir}/icons/hicolor/24x24/apps/*.png +%{_datadir}/icons/hicolor/32x32/apps/*.png +%{_datadir}/icons/hicolor/48x48/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg +%{_datadir}/mime/packages/x-fskin.xml +%{_datadir}/%{name}/addon/fcitx-pinyin.conf +%{_datadir}/%{name}/addon/fcitx-pinyin-enhance.conf +%{_datadir}/%{name}/addon/fcitx-qw.conf +%{_datadir}/%{name}/addon/fcitx-table.conf +%{_datadir}/%{name}/addon/%{name}-[!pqt]*.conf +%{_datadir}/%{name}/addon/%{name}-punc.conf +%{_datadir}/%{name}/addon/%{name}-quickphrase.conf +%{_datadir}/%{name}/configdesc/fcitx-[!p]*.desc +%{_datadir}/%{name}/configdesc/fcitx-pinyin.desc +%{_datadir}/%{name}/configdesc/fcitx-pinyin-enhance.desc +%{_datadir}/%{name}/configdesc/[!ft]*.desc +%{_datadir}/%{name}/configdesc/table.desc +%{_datadir}/%{name}/data/ +%{_datadir}/%{name}/dbus/daemon.conf +%{_datadir}/%{name}/imicon/pinyin.png +%{_datadir}/%{name}/imicon/[!ps]*.png +%{_datadir}/%{name}/imicon/shuangpin.png +%{_datadir}/%{name}/inputmethod/pinyin.conf +%{_datadir}/%{name}/inputmethod/qw.conf +%{_datadir}/%{name}/inputmethod/shuangpin.conf +%{_datadir}/%{name}/pinyin/ +%{_datadir}/%{name}/py-enhance/ +%{_datadir}/%{name}/skin/ +%{_datadir}/%{name}/spell/ +%{_datadir}/%{name}/table/* +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/addon +%dir %{_datadir}/%{name}/configdesc/ +%dir %{_datadir}/%{name}/dbus/ +%dir %{_datadir}/%{name}/imicon/ +%dir %{_datadir}/%{name}/inputmethod/ +%dir %{_datadir}/%{name}/table/ +%{_mandir}/man1/createPYMB.1* +%{_mandir}/man1/fcitx.1* +%{_mandir}/man1/fcitx-remote.1* +%{_mandir}/man1/mb2org.1* +%{_mandir}/man1/mb2txt.1* +%{_mandir}/man1/readPYBase.1* +%{_mandir}/man1/readPYMB.1* +%{_mandir}/man1/scel2org.1* +%{_mandir}/man1/txt2mb.1* + + +%files libs +%license COPYING +%dir %{_libdir}/girepository-1.0/ +%dir %{_libdir}/%{name}/ +%{_libdir}/girepository-1.0/Fcitx-1.0.typelib +%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-fcitx.so +%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-fcitx.so +%{_libdir}/libfcitx*.so.* +%{_libdir}/%{name}/libexec/ +%{_libdir}/%{name}/%{name}-pinyin-enhance.so +%{_libdir}/%{name}/%{name}-pinyin.so +%{_libdir}/%{name}/%{name}-[!pqt]*.so +%{_libdir}/%{name}/%{name}-punc.so +%{_libdir}/%{name}/%{name}-quickphrase.so +%{_libdir}/%{name}/%{name}-qw.so +%{_libdir}/%{name}/%{name}-table.so +%{_libdir}/qt4/plugins/inputmethods/qtim-fcitx.so + + +%files devel +%license COPYING +%{_bindir}/fcitx4-config +%{_libdir}/libfcitx*.so +%{_libdir}/pkgconfig/fcitx*.pc +%{_includedir}/fcitx* +%{_datadir}/cmake/%{name}/ +%{_docdir}/%{name}/* +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/Fcitx-1.0.gir + +%changelog +* Tue Dec 22 2020 weidong - 4.2.9.7-1 +- Initial Package diff --git a/xinput-fcitx b/xinput-fcitx new file mode 100755 index 0000000000000000000000000000000000000000..21faa3fecc65e7a8585b6d3c6390fc617182ea0c --- /dev/null +++ b/xinput-fcitx @@ -0,0 +1,17 @@ +XIM=fcitx +XIM_PROGRAM=/usr/bin/fcitx +ICON="/usr/share/pixmaps/fcitx.png" +XIM_ARGS="-D" +PREFERENCE_PROGRAM=/usr/bin/fcitx-configtool +SHORT_DESC="FCITX" +GTK_IM_MODULE=fcitx +if test -f /usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so || \ + test -f /usr/lib64/qt4/plugins/inputmethods/qtim-fcitx.so || \ + test -f /usr/lib/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so || \ + test -f /usr/lib64/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so; +then + QT_IM_MODULE=fcitx +else + QT_IM_MODULE=xim +fi +