fcitx5/fcitx5.spec
Marguerite Su 73a7cfcfd5 Accepting request 1010892 from home:MargueriteSu:branches:M17N
- according to upstream, XMODIFIERS and QT/GTK_IM_MODULE should
  set to fcitx instead of fcitx5
- build with enchant-2 again (boo#1203575)
- update version 5.0.19
  * classicui: support blur mask on kwin (x11&wayland)
  * xim: fix preedit start callback
- switch source to _dict variant and drop
  * en_dict-20121020.tar.gz
  * fcitx5-no-download.patch
- drop 0001-Remove-unused-xkbcommon-headers.patch,
  upstreamed
- Fix the fcitx 4 obsoletes - obsoleting fcitx <= 4.2.9.8 does not suffice, we
  are at fcitx-4.2.9.9-1.2
- Update to 5.0.18
  * Support for plasma themes in classicui
  * Fix client cursor disappears when using qt text-input-v2
  * Fix clear text when ctrl+c when using gtk text-input-v3
  * Fix a rare wayland protocol error on sway
- Fix build by removing unused headers (gh#fcitx/fcitx5#538)
  * 0001-Remove-unused-xkbcommon-headers.patch
- Replace raw package name with pkgconfig()
- Remove "ENABLE_PRESAGE", it's not used anywhere
  (e7348f0f97)
- update version 5.0.15
  * bugfix release, drop EGL in classic UI 
- systemd user env generator moved to package systemd-inputmethod-generator
- fcitx4 further splits its libraries, adds new Provides/Obsoletes
- fix preun scirpt
- update version 5.0.14
  * support populate keyboard layout configuration to KDE5
    under wayland.
  * A fcitx5-wayland-launcher tool to use the same fcitx
    instance with multiple wayland compositors.
  * Fix a crash when building with libevent.
  * Generates coredump on crash.
  * Refactor wl_shm code to use modern shared memory API
    on linux/BSD
  * Fix wayland input method protocol under weston
  * Fix paging button not clickable under vertical layout
- drop baselibs.conf, no consumer yet
- update version 5.0.13
  * bug fix release
- change in 5.0.12
  * A lot of fixes in zwp_input_method_v1 to make it ready to be used
    with future Plasma 5.24 native wayland input method support. With
    the next Plasma release (not out yet as of today), you should be
    able to directly select fcitx in the "Virtual keyboard KCM" (it was
    designed for on screen keyboard so the naming is a little bit
    confusing at this point) and use it with native wayland input
    method protocols. This allows some non-gtk/qt text-input-v{2,3}
    applications to be used with the input method under kwin. 
- add fcitx5-5.0.13-memfd.patch
- Fix xim.d script for KDE Plasma (boo#1194916);
  $WINDOWMANAGER check needs to be adjusted
- can start via systemd user service on wayland
- fix typo and requirements
- update to version 5.0.11
- update to version 5.0.9
  * Wayland repeat key fix under native wayland input method protocol
  * Improved fcitx5-diagnose to include more information
  * Screen DPI detection fixing, now you can change DPI on the fly without the need to restart fcitx.
    This also fixed another issue about when fcitx does not pick up DPI change upon login.
  * Fix XWindow based tray menu
  * Fix multi-screen detection with xrandr. Under certain cases, screen change may not be automatically picked up.
- Fix build with Leap 15.3 and 15.4 due to rsvg pkg conflicts
- update version 5.0.8
  * Fix key repeating with wayland input method protocol
  * Workaround SNI gnome extension for "empty icon" or
    duplicate icon with kimpanel issue.
  * The Unicode addon trigger key is now configurable.
  * Fix some BSD build issue
  * Fix key grab when the input method group is added or removed.
- update version 5.0.7
  * Fix reforwarding event value 
- update version 5.0.6
  * Improve the build ability on android/ios, more options can be disabled.
  * xim uses sync mode
  * Reload new addon at runtime with version check.
  * Bug fix on rotated screen.
  * Use fixed line height for classicui.
  * Fix "Default" value for classicui
  * Add sub mode label to input method
- update version 5.0.5
  * Add a new client side ui api to have extensive support for the
    client side input panel
  * Fix a bunch of issue in classic ui theme and add an option for
    customize border if image is not used.
  * fix ibus frontend content type
  * reduce the memory usage by making unicode data load on demand.
- update version 5.0.4
  * Supporting resolving the session dbus address exported to X11
  * Add long press support for special symbol, this is disabled by default and also customizable.
  * Avoid trigger dbus activation for "fcitx5-remote -e"
  * In order to support "old" fcitx im module bundled, added a new fcitx4 frontend (mainly to support wps-office out of box).
- add fcitx5-gcc7.patch: fix build on openSUSE Leap 15.1 with gcc7
- update version 5.0.3
- Move the startup snippet to /usr/etc/X11/xim.d for TW
- update version 5.0.1
- Update the spec file to obselete fcitx < 4.99.0
- Update to version 4.99+git20201015.dd9dc94:
  * Preload default input method configured in the group.
  * Add logger type for multimap/set.
  * Batch multiple commit string together
  * Make candidate list key based label support more key
  * add fcitx5-diagnose
  * add support for modifying default configuration at runtime
- update to 4.99.0+git20200902.a87f7b0
- FTBFS for Tumbleweed
  * add fcitx5-std-runtime_error.patch, std::runtime_error is in
    stdexcept.h
- update to version 4.99.0+git20200212.9436416
  * Add log functionality for surrounding text
  * Add fsync before rename
  * Add shorthand append for candidate list
  * Make cldr emoji annotation as required
  * Add emoji module and emoji typing in keyboard module
- add build-requires cldr-emoji-annotation-devel
- fix build errors on openSUSE_Leap_15.2
- fix build-requires for factory/tumbleweed
  rsvg-convert tool is now in rsvg-convert package 
- update version 4.99.0+git20181128.984f3f2
- initial package

OBS-URL: https://build.opensuse.org/request/show/1010892
OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx5?expand=0&rev=40
2022-10-14 11:49:55 +00:00

273 lines
8.3 KiB
RPMSpec

#
# spec file for package fcitx5
#
# Copyright (c) 2022 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if ! %{defined _distconfdir}
%define _distconfdir %{_sysconfdir}
%endif
%if ! %{defined _environmentdir}
%define _environmentdir %{_prefix}/lib/environment.d
%endif
Name: fcitx5
Version: 5.0.19
Release: 0
Summary: Next generation of fcitx
License: LGPL-2.1-or-later
Group: System/I18n/Chinese
URL: https://github.com/fcitx/fcitx5
Source: https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}_dict.tar.xz
Source2: https://raw.githubusercontent.com/fcitx/fcitx-artwork/master/logo/Fcitx.svg
Source3: xim.d-fcitx5
Source4: macros.fcitx5
Source102: fcitx5.service
Patch1: fcitx5-gcc7.patch
Patch2: fcitx5-5.0.13-memfd.patch
BuildRequires: cmake
BuildRequires: dbus-1-devel
BuildRequires: extra-cmake-modules
BuildRequires: fdupes
BuildRequires: ninja
%if 0%{?suse_version} >= 1550
BuildRequires: gcc-c++
%else
BuildRequires: gcc8-c++
%endif
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: xcb-util-wm-devel
BuildRequires: xkeyboard-config
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(cldr-emoji-annotation)
BuildRequires: pkgconfig(enchant-2)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-imdkit)
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xkbcommon-x11)
BuildRequires: pkgconfig(xkbfile)
%if 0%{?suse_version} <= 1520
BuildRequires: appstream-glib-devel
%endif
Provides: fcitx = %{version}
Obsoletes: fcitx < 5
Provides: inputmethod
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 && 0%{?is_opensuse}
BuildRequires: rsvg-convert
%else
BuildRequires: rsvg-view
%endif
%systemd_requires
%description
Fcitx 5 is a generic input method framework.
%package devel
Summary: Development files for fcitx5
Group: Development/Libraries/C and C++
Requires: fcitx5 = %{version}
Requires: libFcitx5Config6 = %{version}
Requires: libFcitx5Core7 = %{version}
Requires: libFcitx5Utils2 = %{version}
Provides: fcitx-devel = %{version}
Obsoletes: fcitx-devel < 5
%description devel
This package provides development files for fcitx5.
%package -n libFcitx5Config6
Summary: Configuration library for fcitx5
Group: System/Libraries
Provides: libFcitx5Config5 = %{version}
Obsoletes: libFcitx5Config5 < %{version}
Obsoletes: libfcitx-config4 < 5
%description -n libFcitx5Config6
This package provides configuration libraries for fcitx5.
%package -n libFcitx5Core7
Summary: Core library for fcitx5
Group: System/Libraries
Provides: libfcitx-4_2_9 = %{version}
Obsoletes: libfcitx-4_2_9 < 5
Provides: libFcitx5Core5 = %{version}
Obsoletes: libFcitx5Core5 < %{version}
Provides: libfcitx-core0 = %{version}
Obsoletes: libfcitx-core0 < 5
%description -n libFcitx5Core7
This package provides core libraries for fcitx5.
%package -n libFcitx5Utils2
Summary: Utility library for fcitx5
Group: System/Libraries
Provides: libFcitx5Utils1 = %{version}
Obsoletes: libFcitx5Utils1 < %{version}
Provides: libfcitx-utils0 = %{version}
Obsoletes: libfcitx-utils0 < 5
%description -n libFcitx5Utils2
This package provides utility libraries for fcitx5.
%prep
%autosetup -p1
%build
%if 0%{?suse_version} < 1550
export CC=%{_bindir}/gcc-8
export CXX=%{_bindir}/g++-8
%endif
%cmake -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
%cmake_build
%install
%cmake_install
# 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/
# create autostart
mkdir -p %{buildroot}%{_distconfdir}/X11/xim.d/
install -m 644 %{SOURCE3} %{buildroot}%{_distconfdir}/X11/xim.d/fcitx5
priority=30
pushd %{buildroot}%{_distconfdir}/X11/xim.d/
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
ln -s ../fcitx5 $priority-fcitx5
popd
done
popd
install -D -m 0644 %{SOURCE102} %{buildroot}%{_userunitdir}/fcitx5.service
# install icons
for i in 16 22 24 32 48 512; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/
rsvg-convert -h $i -w $i %{SOURCE2} -o %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/fcitx.png
done
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/fcitx.svg
# install desktop files
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/org.fcitx.Fcitx5.desktop Utility DesktopUtility
%suse_update_desktop_file -r fcitx5-configtool Settings DesktopSettings
# own directories
mkdir -p %{buildroot}%{_datadir}/fcitx5/inputmethod
mkdir -p %{buildroot}%{_libdir}/fcitx5/qt5
# install macros.fcitx5
install -Dm 0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/rpm/macros.d/macros.fcitx5
%find_lang fcitx5
%fdupes %{buildroot}
%if 0%{?suse_version} >= 1550
%systemd_user_pre fcitx5.service
%systemd_user_post fcitx5.service
%systemd_user_preun fcitx5.service
%systemd_user_postun fcitx5.service
%else
%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
%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
%preun
if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then
/usr/bin/systemctl --global disable %{name}.service || :
fi
%endif
%post -n libFcitx5Config6 -p /sbin/ldconfig
%post -n libFcitx5Core7 -p /sbin/ldconfig
%post -n libFcitx5Utils2 -p /sbin/ldconfig
%postun -n libFcitx5Config6 -p /sbin/ldconfig
%postun -n libFcitx5Core7 -p /sbin/ldconfig
%postun -n libFcitx5Utils2 -p /sbin/ldconfig
%files -f fcitx5.lang
%doc README.md
%license LICENSES
%{_distconfdir}/X11/xim.d/
%{_sysconfdir}/xdg/autostart/org.fcitx.Fcitx5.desktop
%{_bindir}/fcitx5
%{_bindir}/fcitx5-configtool
%{_bindir}/fcitx5-remote
%{_bindir}/fcitx5-diagnose
%{_libdir}/fcitx5
%{_libexecdir}/fcitx5-wayland-launcher
%{_userunitdir}/fcitx5.service
%{_datadir}/applications/org.fcitx.Fcitx5.desktop
%{_datadir}/applications/fcitx5-configtool.desktop
%{_datadir}/fcitx5
%{_datadir}/icons/hicolor/*/apps/fcitx.*
%{_datadir}/icons/hicolor/*/apps/org.fcitx.Fcitx5.*
%{_datadir}/dbus-1/services/org.fcitx.Fcitx5.service
%{_datadir}/metainfo/org.fcitx.Fcitx5.metainfo.xml
%files devel
%{_prefix}/lib/rpm/macros.d/macros.fcitx5
%{_includedir}/Fcitx5
%{_libdir}/cmake/Fcitx5*
%{_libdir}/libFcitx5Config.so
%{_libdir}/libFcitx5Core.so
%{_libdir}/libFcitx5Utils.so
%{_libdir}/pkgconfig/Fcitx5*.pc
%files -n libFcitx5Config6
%{_libdir}/libFcitx5Config.so.6
%{_libdir}/libFcitx5Config.so.%{version}
%files -n libFcitx5Core7
%{_libdir}/libFcitx5Core.so.7
%{_libdir}/libFcitx5Core.so.%{version}
%files -n libFcitx5Utils2
%{_libdir}/libFcitx5Utils.so.2
%{_libdir}/libFcitx5Utils.so.%{version}
%changelog