2019-08-21 07:10:38 +02:00
|
|
|
#
|
|
|
|
# spec file for package fcitx5
|
|
|
|
#
|
2022-02-12 09:29:24 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-08-21 07:10:38 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-11-11 07:28:05 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-08-21 07:10:38 +02:00
|
|
|
#
|
|
|
|
|
2022-02-12 09:29:24 +01:00
|
|
|
|
2020-11-28 06:23:29 +01:00
|
|
|
%if ! %{defined _distconfdir}
|
|
|
|
%define _distconfdir %{_sysconfdir}
|
|
|
|
%endif
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2022-01-27 16:02:29 +01:00
|
|
|
%if ! %{defined _environmentdir}
|
|
|
|
%define _environmentdir %{_prefix}/lib/environment.d
|
|
|
|
%endif
|
|
|
|
|
2019-08-21 07:10:38 +02:00
|
|
|
Name: fcitx5
|
2022-02-12 09:29:24 +01:00
|
|
|
Version: 5.0.14
|
2019-08-21 07:10:38 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Next generation of fcitx
|
|
|
|
License: LGPL-2.1-or-later
|
2020-11-11 07:28:05 +01:00
|
|
|
Group: System/I18n/Chinese
|
|
|
|
URL: https://github.com/fcitx/fcitx5
|
|
|
|
Source: https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}.tar.xz
|
2020-10-23 11:19:16 +02:00
|
|
|
Source1: en_dict-20121020.tar.gz
|
|
|
|
Source2: https://raw.githubusercontent.com/fcitx/fcitx-artwork/master/logo/Fcitx.svg
|
|
|
|
Source3: xim.d-fcitx5
|
|
|
|
Source4: macros.fcitx5
|
2022-01-15 06:07:35 +01:00
|
|
|
Source102: fcitx5.service
|
2020-11-11 07:28:05 +01:00
|
|
|
Patch0: fcitx5-no-download.patch
|
2020-12-11 08:15:21 +01:00
|
|
|
Patch1: fcitx5-gcc7.patch
|
2022-01-27 16:02:29 +01:00
|
|
|
Patch2: fcitx5-5.0.13-memfd.patch
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: Mesa-libEGL-devel
|
|
|
|
BuildRequires: cairo-devel
|
2020-03-06 14:15:16 +01:00
|
|
|
BuildRequires: cldr-emoji-annotation-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: cmake
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: dbus-1-devel
|
|
|
|
BuildRequires: enchant-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: extra-cmake-modules
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: fmt-devel
|
2021-05-06 06:29:42 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: gcc-c++
|
2021-05-06 06:29:42 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: gcc8-c++
|
|
|
|
%endif
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: gdk-pixbuf-devel
|
|
|
|
BuildRequires: hicolor-icon-theme
|
|
|
|
BuildRequires: iso-codes-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: libevent-devel
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: libexpat-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: libjson-c-devel
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: libpresage-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: libxkbcommon-devel
|
|
|
|
BuildRequires: libxkbcommon-x11-devel
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: libxkbfile-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: pango-devel
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: systemd-devel
|
2019-08-21 07:10:38 +02:00
|
|
|
BuildRequires: update-desktop-files
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: wayland-devel
|
|
|
|
BuildRequires: wayland-protocols-devel
|
|
|
|
BuildRequires: xcb-imdkit-devel
|
|
|
|
BuildRequires: xcb-util-keysyms-devel
|
|
|
|
BuildRequires: xcb-util-wm-devel
|
|
|
|
BuildRequires: xkeyboard-config
|
2020-12-11 08:15:21 +01:00
|
|
|
%if 0%{?suse_version} <= 1520
|
|
|
|
BuildRequires: appstream-glib-devel
|
|
|
|
%endif
|
2019-08-21 07:10:38 +02:00
|
|
|
Provides: fcitx = %{version}
|
2021-01-31 07:29:11 +01:00
|
|
|
Obsoletes: fcitx <= 4.2.9.8
|
2021-10-28 16:16:21 +02:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 && 0%{?is_opensuse}
|
2020-11-11 07:28:05 +01:00
|
|
|
BuildRequires: rsvg-convert
|
|
|
|
%else
|
|
|
|
BuildRequires: rsvg-view
|
|
|
|
%endif
|
2022-01-15 06:07:35 +01:00
|
|
|
%systemd_requires
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Fcitx 5 is a generic input method framework.
|
|
|
|
|
|
|
|
%package devel
|
2020-11-11 07:28:05 +01:00
|
|
|
Summary: Development files for fcitx5
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: fcitx5 = %{version}
|
2022-01-27 16:02:29 +01:00
|
|
|
Requires: libFcitx5Config6 = %{version}
|
|
|
|
Requires: libFcitx5Core7 = %{version}
|
|
|
|
Requires: libFcitx5Utils2 = %{version}
|
2021-01-31 07:29:11 +01:00
|
|
|
Provides: fcitx-devel = %{version}
|
|
|
|
Obsoletes: fcitx-devel <= 4.2.9.8
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package provides development files for fcitx5.
|
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%package -n libFcitx5Config6
|
2020-11-11 07:28:05 +01:00
|
|
|
Summary: Configuration library for fcitx5
|
|
|
|
Group: System/Libraries
|
2022-01-15 06:07:35 +01:00
|
|
|
Provides: libFcitx5Config5 = %{version}
|
|
|
|
Obsoletes: libFcitx5Config5 < %{version}
|
2022-02-25 05:56:34 +01:00
|
|
|
Provides: libfcitx-config4 = %{verson}
|
|
|
|
Obsoltes: libfcitx-config4 <= 4.2.9.8
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%description -n libFcitx5Config6
|
2019-08-21 07:10:38 +02:00
|
|
|
This package provides configuration libraries for fcitx5.
|
|
|
|
|
2020-10-23 11:19:16 +02:00
|
|
|
%package -n libFcitx5Core7
|
2020-11-11 07:28:05 +01:00
|
|
|
Summary: Core library for fcitx5
|
|
|
|
Group: System/Libraries
|
|
|
|
Provides: libfcitx-4_2_9 = %{version}
|
2021-01-31 07:29:11 +01:00
|
|
|
Obsoletes: libfcitx-4_2_9 <= 4.2.9.8
|
2020-11-11 07:28:05 +01:00
|
|
|
Provides: libFcitx5Core5 = %{version}
|
|
|
|
Obsoletes: libFcitx5Core5 < %{version}
|
2022-02-25 05:56:34 +01:00
|
|
|
Provides: libfcitx-core0 = %{version}
|
|
|
|
Obsoletes: libfcitx-core0 <= 4.2.9.8
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2020-10-23 11:19:16 +02:00
|
|
|
%description -n libFcitx5Core7
|
2019-08-21 07:10:38 +02:00
|
|
|
This package provides core libraries for fcitx5.
|
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%package -n libFcitx5Utils2
|
2020-11-11 07:28:05 +01:00
|
|
|
Summary: Utility library for fcitx5
|
|
|
|
Group: System/Libraries
|
|
|
|
Provides: libFcitx5Utils1 = %{version}
|
|
|
|
Obsoletes: libFcitx5Utils1 < %{version}
|
2022-02-25 05:56:34 +01:00
|
|
|
Provides: libfcitx-utils0 = %{version}
|
|
|
|
Obsoletes: libfcitx-utils0 <= 4.2.9.8
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%description -n libFcitx5Utils2
|
2019-08-21 07:10:38 +02:00
|
|
|
This package provides utility libraries for fcitx5.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2020-11-11 07:28:05 +01:00
|
|
|
%patch0 -p1
|
2020-12-10 01:38:11 +01:00
|
|
|
%patch1 -p1
|
2022-01-27 16:02:29 +01:00
|
|
|
%patch2 -p1
|
2020-11-11 07:28:05 +01:00
|
|
|
cp -r %{SOURCE1} src/modules/spell/dict/
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%build
|
2021-05-06 06:29:42 +02:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
export CC=%{_bindir}/gcc-8
|
|
|
|
export CXX=%{_bindir}/g++-8
|
|
|
|
%endif
|
2020-11-11 07:28:05 +01:00
|
|
|
%cmake -DENABLE_PRESAGE=On -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
|
|
|
|
%make_build
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
2020-11-11 07:28:05 +01:00
|
|
|
# recreate soft link
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/org.fcitx.Fcitx5.desktop
|
|
|
|
ln -sf %{_datadir}/applications/org.fcitx.Fcitx5.desktop %{buildroot}%{_sysconfdir}/xdg/autostart/
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
# create autostart
|
2020-11-28 06:23:29 +01:00
|
|
|
mkdir -p %{buildroot}%{_distconfdir}/X11/xim.d/
|
2022-01-15 06:07:35 +01:00
|
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_distconfdir}/X11/xim.d/fcitx5
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
priority=30
|
2020-11-28 06:23:29 +01:00
|
|
|
pushd %{buildroot}%{_distconfdir}/X11/xim.d/
|
2019-08-21 07:10:38 +02:00
|
|
|
for lang in am ar as bn el fa gu he hi hr ja ka kk kn ko lo ml my \
|
|
|
|
pa ru sk vi zh_TW zh_CN zh_HK zh_SG \
|
|
|
|
de fr it es nl cs pl da nn nb fi en sv ; do
|
|
|
|
mkdir $lang
|
|
|
|
pushd $lang
|
2022-01-15 06:07:35 +01:00
|
|
|
ln -s ../fcitx5 $priority-fcitx5
|
2019-08-21 07:10:38 +02:00
|
|
|
popd
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
2022-01-15 06:07:35 +01:00
|
|
|
install -D -m 0644 %{SOURCE102} %{buildroot}%{_userunitdir}/fcitx5.service
|
|
|
|
|
2019-08-21 07:10:38 +02:00
|
|
|
# install icons
|
|
|
|
for i in 16 22 24 32 48 512; do
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/
|
2020-11-11 07:28:05 +01:00
|
|
|
rsvg-convert -h $i -w $i %{SOURCE2} -o %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/fcitx.png
|
2019-08-21 07:10:38 +02:00
|
|
|
done
|
2020-11-11 07:28:05 +01:00
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/fcitx.svg
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
# install desktop files
|
2020-11-11 07:28:05 +01:00
|
|
|
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/org.fcitx.Fcitx5.desktop Utility DesktopUtility
|
2022-01-27 16:02:29 +01:00
|
|
|
%suse_update_desktop_file -r fcitx5-configtool Settings DesktopSettings
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
# own directories
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/fcitx5/inputmethod
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/fcitx5/qt5
|
|
|
|
|
|
|
|
# install macros.fcitx5
|
2022-01-27 16:02:29 +01:00
|
|
|
install -Dm 0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/rpm/macros.d/macros.fcitx5
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%find_lang fcitx5
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
2022-01-27 16:02:29 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2022-01-15 06:07:35 +01:00
|
|
|
%systemd_user_pre fcitx5.service
|
|
|
|
%systemd_user_post fcitx5.service
|
|
|
|
%systemd_user_preun fcitx5.service
|
|
|
|
%systemd_user_postun fcitx5.service
|
2022-01-27 16:02:29 +01:00
|
|
|
%else
|
2022-02-12 09:29:24 +01:00
|
|
|
|
2022-01-27 16:02:29 +01:00
|
|
|
%pre
|
|
|
|
if [ -x /usr/bin/systemctl ]; then
|
|
|
|
if [ ! -e "/usr/lib/systemd/user/%{name}.service" ]; then
|
|
|
|
mkdir -p /run/systemd/rpm/needs-user-preset
|
|
|
|
touch "/run/systemd/rpm/needs-user-preset/%{name}.service"
|
|
|
|
fi
|
|
|
|
fi
|
2022-02-12 09:29:24 +01:00
|
|
|
|
2022-01-27 16:02:29 +01:00
|
|
|
%post
|
|
|
|
if [ -x /usr/bin/systemctl ]; then
|
|
|
|
if [ -e "/run/systemd/rpm/needs-user-preset/%{name}.service" ]; then
|
|
|
|
/usr/bin/systemctl --global preset "%{name}.service" || :
|
|
|
|
rm "/run/systemd/rpm/needs-user-preset/%{name}.service" || :
|
|
|
|
fi
|
|
|
|
fi
|
2022-02-12 09:29:24 +01:00
|
|
|
|
2022-01-27 16:02:29 +01:00
|
|
|
%preun
|
2022-02-16 14:57:06 +01:00
|
|
|
if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then
|
2022-02-16 16:41:43 +01:00
|
|
|
/usr/bin/systemctl --global disable %{name}.service || :
|
2022-01-27 16:02:29 +01:00
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%post -n libFcitx5Config6 -p /sbin/ldconfig
|
2020-10-23 11:19:16 +02:00
|
|
|
%post -n libFcitx5Core7 -p /sbin/ldconfig
|
2020-09-05 11:23:15 +02:00
|
|
|
%post -n libFcitx5Utils2 -p /sbin/ldconfig
|
|
|
|
%postun -n libFcitx5Config6 -p /sbin/ldconfig
|
2020-10-23 11:19:16 +02:00
|
|
|
%postun -n libFcitx5Core7 -p /sbin/ldconfig
|
2020-09-05 11:23:15 +02:00
|
|
|
%postun -n libFcitx5Utils2 -p /sbin/ldconfig
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%files -f fcitx5.lang
|
2020-09-05 11:23:15 +02:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSES
|
2020-11-28 06:23:29 +01:00
|
|
|
%{_distconfdir}/X11/xim.d/
|
2020-11-11 07:28:05 +01:00
|
|
|
%{_sysconfdir}/xdg/autostart/org.fcitx.Fcitx5.desktop
|
2019-08-21 07:10:38 +02:00
|
|
|
%{_bindir}/fcitx5
|
|
|
|
%{_bindir}/fcitx5-configtool
|
|
|
|
%{_bindir}/fcitx5-remote
|
2020-10-23 11:19:16 +02:00
|
|
|
%{_bindir}/fcitx5-diagnose
|
2019-08-21 07:10:38 +02:00
|
|
|
%{_libdir}/fcitx5
|
2022-02-12 09:29:24 +01:00
|
|
|
%{_libexecdir}/fcitx5-wayland-launcher
|
2022-01-15 06:07:35 +01:00
|
|
|
%{_userunitdir}/fcitx5.service
|
2020-11-11 07:28:05 +01:00
|
|
|
%{_datadir}/applications/org.fcitx.Fcitx5.desktop
|
2019-08-21 07:10:38 +02:00
|
|
|
%{_datadir}/applications/fcitx5-configtool.desktop
|
|
|
|
%{_datadir}/fcitx5
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/fcitx.*
|
2020-12-10 01:38:11 +01:00
|
|
|
%{_datadir}/icons/hicolor/*/apps/org.fcitx.Fcitx5.*
|
2020-11-11 07:28:05 +01:00
|
|
|
%{_datadir}/dbus-1/services/org.fcitx.Fcitx5.service
|
|
|
|
%{_datadir}/metainfo/org.fcitx.Fcitx5.metainfo.xml
|
2019-08-21 07:10:38 +02:00
|
|
|
|
|
|
|
%files devel
|
2022-01-27 16:02:29 +01:00
|
|
|
%{_prefix}/lib/rpm/macros.d/macros.fcitx5
|
2019-08-21 07:10:38 +02:00
|
|
|
%{_includedir}/Fcitx5
|
|
|
|
%{_libdir}/cmake/Fcitx5*
|
|
|
|
%{_libdir}/libFcitx5Config.so
|
|
|
|
%{_libdir}/libFcitx5Core.so
|
|
|
|
%{_libdir}/libFcitx5Utils.so
|
|
|
|
%{_libdir}/pkgconfig/Fcitx5*.pc
|
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%files -n libFcitx5Config6
|
|
|
|
%{_libdir}/libFcitx5Config.so.6
|
2021-01-31 07:29:11 +01:00
|
|
|
%{_libdir}/libFcitx5Config.so.%{version}
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2020-10-23 11:19:16 +02:00
|
|
|
%files -n libFcitx5Core7
|
|
|
|
%{_libdir}/libFcitx5Core.so.7
|
2021-01-31 07:29:11 +01:00
|
|
|
%{_libdir}/libFcitx5Core.so.%{version}
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2020-09-05 11:23:15 +02:00
|
|
|
%files -n libFcitx5Utils2
|
|
|
|
%{_libdir}/libFcitx5Utils.so.2
|
2021-01-31 07:29:11 +01:00
|
|
|
%{_libdir}/libFcitx5Utils.so.%{version}
|
2019-08-21 07:10:38 +02:00
|
|
|
|
2022-02-12 09:29:24 +01:00
|
|
|
%changelog
|