From 6381d2e4172b90e324044c403b423335ff5a4230 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 20 Nov 2024 13:06:13 +0800 Subject: [PATCH] adopt to new cmake macro --- fcitx5-disab-dbus-tests.patch | 11 ++++++++++ fcitx5.spec | 38 ++++++++++++++--------------------- 2 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 fcitx5-disab-dbus-tests.patch diff --git a/fcitx5-disab-dbus-tests.patch b/fcitx5-disab-dbus-tests.patch new file mode 100644 index 0000000..69e7571 --- /dev/null +++ b/fcitx5-disab-dbus-tests.patch @@ -0,0 +1,11 @@ +--- fcitx5-5.1.10/test/CMakeLists.txt.orig 2024-11-20 13:04:35.212500434 +0800 ++++ fcitx5-5.1.10/test/CMakeLists.txt 2024-11-20 13:04:48.594686421 +0800 +@@ -40,7 +40,7 @@ + add_executable(XvfbWrapper IMPORTED) + set_target_properties(XvfbWrapper PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/xvfb_wrapper.sh") + +-if (ENABLE_DBUS) ++if (0) + find_program(DBUS_DAEMON_BIN dbus-daemon) + add_executable(DBusWrapper IMPORTED) + set_target_properties(DBusWrapper PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/dbus_wrapper.sh") diff --git a/fcitx5.spec b/fcitx5.spec index de19428..b8de7b7 100644 --- a/fcitx5.spec +++ b/fcitx5.spec @@ -2,13 +2,14 @@ Name: fcitx5 Version: 5.1.10 -Release: 1 +Release: 2 Summary: Next generation of fcitx -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://github.com/fcitx/fcitx5 Source0: https://download.fcitx-im.org/fcitx5/fcitx5/fcitx5-%{version}_dict.tar.zst Source1: fcitx5-xinput Source2: fcitx5.sh +Patch0: fcitx5-disab-dbus-tests.patch BuildRequires: cmake BuildRequires: ninja-build @@ -94,32 +95,17 @@ This package will setup autostart and environment needed for fcitx5 to work prop %autosetup -p1 %build -mkdir %{_target_platform} -pushd %{_target_platform} -%cmake .. -GNinja -popd - -%__cmake --build %{_target_platform} %{?_smp_mflags} +%cmake -GNinja +%cmake_build %install -DESTDIR=%{buildroot} %__cmake --install %{_target_platform} +%cmake_install install -pm 644 -D %{S:1} %{buildroot}%{_xinputconf} install -pm 644 -D %{S:2} %{buildroot}%{_sysconfdir}/profile.d/fcitx5.sh install -d %{buildroot}%{_datadir}/%{name}/inputmethod install -d %{buildroot}%{_datadir}/%{name}/table -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/org.fcitx.Fcitx5.desktop - -desktop-file-install --delete-original \ - --dir %{buildroot}%{_datadir}/applications \ - %{buildroot}%{_datadir}/applications/%{name}-wayland-launcher.desktop - + # convert symlinked icons to copied icons, this will help co-existing with # fcitx4 for iconfile in $(find %{buildroot}%{_datadir}/icons -type l) @@ -128,11 +114,11 @@ do rm -f ${iconfile} cp ${origicon} ${iconfile} done -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %find_lang %{name} %check -ctest --test-dir %{_target_platform} --output-on-failure --force-new-ctest-process +%ctest +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %post %{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 55 || : @@ -184,6 +170,12 @@ fi %config %{_sysconfdir}/profile.d/fcitx5.sh %changelog +* Wed Nov 20 2024 Funda Wang - 5.1.10-2 +- adopt to new cmake macro +- drop useless desktop-file-install +- move metainfo validation into check section +- disable dbus daemon test, as it does not pass during eulermaker + * Wed Aug 14 2024 liu-hengjian <411918005@qq.com> - 5.1.10-1 - Init package version to 5.1.10 -- Gitee