## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 36; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global __provides_exclude_from ^%{_libdir}/fcitx5/.*\\.so$ %global server_dir %{_libexecdir}/fcitx5-mozc Name: fcitx5-mozc %global forgeurl https://github.com/fcitx/mozc %global commit 242b4f703cba27d4ff4dc123c713a478f964e001 %global archivename %{name}-%{commit} %forgemeta Version: 2.17.2102.102.1 # upstream don't tag release, build git snapshot here # git snapshot should have snapshot date will be taken care # of by forgemeta after importing to dist-git Release: %autorelease Summary: A wrapper of mozc for fcitx5 # fcitx5-mozc is a fork of mozc, difference can be seen at # https://github.com/google/mozc/compare/master...fcitx:fcitx # src/third_party/breakpad : BSD License # src/third_party/japanese_usage_dictionary: BSD license # src/third_party/wtl: MS-PL # src/unix/fcitx5: LGPLv2+ # ---- # data/unicode/: UCD # Copyright (c) 1991-2008 Unicode, Inc. # data/test/stress_test/sentences.txt: Public Domain # data/dictionary_oss/: mecab-ipadic and BSD # See http://code.google.com/p/mozc/issues/detail?id=20 # also data/installer/credits_en.html # src/data/test/dictionary/: same as data/dictionary_oss License: BSD and UCD and Public Domain and mecab-ipadic and LGPLv2+ and MS-PL URL: %{forgeurl} # The source of this package was pulled from upstreams's vcs. # Use the following command to generate the tar ball: # with gtest gyp jsoncpp protobuf abseil-cpp unbundled # ----- # git clone --recursive https://github.com/fcitx/mozc.git --depth 1 # cd mozc # git checkout %%{commit} # for i in gtest gyp jsoncpp protobuf abseil-cpp; do rm -rf src/third_party/$i; done # cd .. # tar --exclude-vcs -czf %%{name}-%%{commit}.tar.gz mozc/ # ----- Source0: %{name}-%{commit}.tar.gz # Public Domain Source1: http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip Source2: http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip # add -v to ninja command, to make verbose output during building Patch0: mozc-build-verbosely.patch Patch1: 0001-use-system-absl.patch Patch2: mozc-build-new-abseil.patch # Add #include directives for compatibility with abseil-cpp-20240116. # Downstream-only because these are fixed upstream in a later release. Patch3: mozc-abseil-cpp-20240116-includes.patch BuildRequires: python3-devel BuildRequires: gettext BuildRequires: gtk2-devel BuildRequires: qt5-qtbase-devel BuildRequires: zinnia-devel BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: gyp >= 0.1-0.4.840svn BuildRequires: fcitx5-devel BuildRequires: libappstream-glib BuildRequires: %{py3_dist six} BuildRequires: protobuf-devel BuildRequires: protobuf-c BuildRequires: abseil-cpp-devel BuildRequires: gtest-devel BuildRequires: jsoncpp-devel BuildRequires: binutils Requires: hicolor-icon-theme Requires: fcitx5 Requires: fcitx5-data # https://bugzilla.redhat.com/show_bug.cgi?id=1419949 # we are using mostly exact mozc server, same problem # may occur here, adding ExcludeArch like ibus-mozc # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: ppc ppc64 sparcv9 sparc64 s390x %{ix86} %description A wrapper of mozc for fcitx5. %prep %setup -q -n mozc -a 1 -a 2 %patch 0 -p1 %patch 1 -p1 %patch 2 -p1 %patch 3 -p1 (cd src/data/dictionary_oss; PYTHONPATH="${PYTHONPATH}:../../" python3 ../../dictionary/gen_zip_code_seed.py --zip_code=../../../KEN_ALL.CSV --jigyosyo=../../../JIGYOSYO.CSV >> dictionary09.txt; ) # Don't build for fcitx4 rm src/unix/fcitx/fcitx.gyp # building with gcc, change to add -lc++ sed "/stdlib=libc++/d;/-lc++/d" -i src/gyp/common.gypi sed "s/clang++/c++/g" -i src/gyp/common.gypi sed "s/clang/gcc/g" -i src/gyp/common.gypi # preserve install time stamp sed "s/ -m/ -pm/g" -i scripts/install_fcitx5 scripts/install_fcitx5_icons %build %set_build_flags pushd src # specify an another path for those mozc server files # to enable this to co-exist with ibus-mozc QTDIR=%{_prefix} \ GYP_DEFINES="document_dir=%{_datadir}/licenses/%{name} use_libzinnia=1 use_system_abseil_cpp=1 use_libprotobuf=1 zinnia_model_file=%{_datadir}/zinnia/model/tomoe/handwriting-ja.model" \ python3 build_mozc.py gyp --gypdir=%{_bindir} --server_dir=%{server_dir} --target_platform=Linux python3 build_mozc.py build -c Release server/server.gyp:mozc_server gui/gui.gyp:mozc_tool unix/fcitx5/fcitx5.gyp:fcitx5-mozc popd %install pushd src export _bldtype=Release install -D -pm 755 "out_linux/${_bldtype}/mozc_server" "%{buildroot}%{server_dir}/mozc_server" install -D -pm 755 "out_linux/${_bldtype}/mozc_tool" "%{buildroot}%{server_dir}/mozc_tool" # fix install dirs in script, don't use those hardcoded paths: # ${PREFIX}/share/metainfo -> _metainfodir sed "s|\${PREFIX}/share/metainfo|%{buildroot}%{_metainfodir}|g" -i ../scripts/install_fcitx5 ../scripts/install_fcitx5_data # ${PREFIX}/share -> _datadir sed "s|\${PREFIX}/share|%{buildroot}%{_datadir}|g" -i ../scripts/install_fcitx5 ../scripts/install_fcitx5_icons ../scripts/install_fcitx5_data # ${PREFIX}/lib -> _libdir sed "s|\${PREFIX}/lib|%{buildroot}%{_libdir}|g" -i ../scripts/install_fcitx5 ../scripts/install_fcitx5 popd appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %find_lang %{name} %files -f %{name}.lang %license LICENSE %doc README.md src/data/installer/*.html %{server_dir} %{_datadir}/fcitx5/*/mozc.conf %{_datadir}/icons/hicolor/*/apps/* %{_libdir}/fcitx5/fcitx5-mozc.so %{_metainfodir}/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml %changelog ## START: Generated by rpmautospec * Sun Aug 25 2024 Benjamin A. Beasley - 2.17.2102.102.1-36 - Rebuilt for abseil-cpp-20240722.0 * Sun Aug 18 2024 Benjamin A. Beasley - 2.17.2102.102.1-35 - Drop i686 support (Changes/EncourageI686LeafRemoval) * Wed Jul 17 2024 Fedora Release Engineering - 2.17.2102.102.1-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Feb 04 2024 Benjamin A. Beasley - 2.17.2102.102.1-33 - rebuild for abseil-cpp 20240116.0 * Sun Jan 28 2024 Benjamin A. Beasley - 2.17.2102.102.1-32 - Add #include directives for compatibility with absl-cpp-20240116 * Sun Jan 28 2024 Benjamin A. Beasley - 2.17.2102.102.1-31 - Don’t link the top-level absl_flags library * Wed Jan 24 2024 Fedora Release Engineering - 2.17.2102.102.1-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 2.17.2102.102.1-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Aug 20 2023 Qiyu Yan - 2.17.2102.102.1-28 - Fix the build issue with newer abseil. * Wed Jul 19 2023 Fedora Release Engineering - 2.17.2102.102.1-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon May 08 2023 Benjamin A. Beasley - 2.17.2102.102.1-26 - Unbundle abseil-cpp since the system one is now used * Thu Mar 23 2023 Qiyu Yan - 2.17.2102.102.1-25 - rebuild for abseil-cpp 20230125.1 * Mon Mar 20 2023 Qiyu Yan - 2.17.2102.102.1-24 - update to 242b4f703cba27d4ff4dc123c713a478f964e001 * Wed Jan 25 2023 Yaakov Selkowitz - 2.17.2102.102.1-23 - Fix build with GCC 13 * Thu Jan 19 2023 Fedora Release Engineering - 2.17.2102.102.1-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Nov 21 2022 Qiyu Yan - 2.17.2102.102.1-21 - update to upstream commit 0cd24273e73ab360c8dbb6e2a94acb135743ee13 * Fri Aug 26 2022 Qiyu Yan - 2.17.2102.102.1-20 - rebuild for abseil-cpp 20220623.0 sobump * Wed Aug 24 2022 Qiyu Yan - 2.17.2102.102.1-19 - update to 20220824gited9c279 * Thu Jul 21 2022 Fedora Release Engineering - 2.17.2102.102.1-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sat Mar 26 2022 Qiyu Yan - 2.17.2102.102.1-17 - update to 1e52f80 * Sat Mar 12 2022 Rich Mattes - 2.17.2102.102.1-16 - Rebuild for abseil-cpp 20211102.0 * Thu Jan 20 2022 Fedora Release Engineering - 2.17.2102.102.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Dec 05 2021 Qiyu Yan - 2.17.2102.102.1-14 - update to git snapshot 20211205git0ad3cf5 * Sat Nov 06 2021 Adrian Reber - 2.17.2102.102.1-13 - Rebuilt for protobuf 3.19.0 * Mon Oct 25 2021 Adrian Reber - 2.17.2102.102.1-12 - Rebuilt for protobuf 3.18.1 * Sun Sep 26 2021 Qiyu Yan - 2.17.2102.102.1-11 - update to 34522ba523e2b331e804dee7229761fc489ca365 * Sun Sep 26 2021 Qiyu Yan - 2.17.2102.102.1-10 - update to 5.0.7 * Sun Sep 12 2021 Qiyu Yan - 2.17.2102.102.1-9 - add missing sources * Sun Sep 12 2021 Qiyu Yan - 2.17.2102.102.1-8 - update to commit 4820f04 * Wed Jul 21 2021 Fedora Release Engineering - 2.17.2102.102.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 10 2021 Rich Mattes - 2.17.2102.102.1-2 - Rebuild for abseil-cpp-20210324.2 * Fri Apr 23 2021 Qiyu Yan - 2.17.2102.102.1-1 - update to 3f2c3c4ff61bb1082bce9716e31f2d4814e075df * Fri Mar 12 2021 Qiyu Yan - 2.17.2102.102.1-1.20210319gitdf9f395 - Initial Package ## END: Generated by rpmautospec