Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:opensuse_zh
hime
_service:set_version:hime.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:set_version:hime.spec of Package hime
# # spec file for package hime # # Copyright (c) 2023 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/ # %define date %(date +%{Y}%{m}%{d}) %if 0%{?suse_version} >= 1550 %define build_qt6 1 %else %define build_qt6 0 %endif Name: hime Version: 0.9.11.1689730249.ed8d4e5 Release: 0%{date} Summary: A GCIN-like Input Method Editor License: LGPL-2.1-or-later Group: System/I18n/Chinese URL: https://github.com/caleb-/hime Source: %{name}-%{version}.tar.xz Source1: xim.d-%{name} Source2: xinput-%{name}.conf Source3: xim.%{name}.suse.template Patch0: utf8-edit.patch Patch1: imhime.c.patch BuildRequires: autoconf automake BuildRequires: anthy-devel BuildRequires: fdupes #BuildRequires: gtk2-devel BuildRequires: gtk3-devel BuildRequires: libQt5Core-devel BuildRequires: libQt5Core-private-headers-devel BuildRequires: libQt5DBus-devel BuildRequires: libQt5DBus-private-headers-devel BuildRequires: libQt5Gui-devel BuildRequires: libQt5Gui-private-headers-devel BuildRequires: libXtst-devel BuildRequires: libappindicator-devel BuildRequires: libchewing-devel BuildRequires: update-desktop-files %if %build_qt6 BuildRequires: qt6-base-devel BuildRequires: qt6-base-private-devel %endif Requires: %{name}-anthy Requires: %{name}-chewing Requires: %{name}-data = %{version} Requires: %{name}-icon-themes Requires: %{name}-tables #%{gtk2_immodule_requires} %description Hime Input Method is a community GCIN fork. GCIN is an input method server supports various IM and all Unix-like OS. %package data Summary: Arch Independent Data for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description data This package contains default theme and other arch independent data for Hime Input Method. %package doc Summary: Documentations for Hime IM Group: Documentation/Man Requires: %{name} = %{version} %description doc This package contains Man Documentations for Hime Input Method. %package devel Summary: Development tools for Hime IM Group: Development/Libraries/C and C++ Requires: %{name} = %{version} %description devel This package contains development tools for Hime Input Method. %package anthy Summary: Anthy Support for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description anthy This package contains anthy support for Hime Input Method. %package chewing Summary: Chewing Support for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description chewing This package contains chewing support for Hime Input Method. %package gtk3-immodule Summary: GTK3 IM Module for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %{gtk3_immodule_requires} %description gtk3-immodule This package contains gtk3 im module for Hime Input Method. %if %build_qt6 %package qt6-immodule Summary: QT6 IM Module for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description qt6-immodule This package contains qt6 im module for Hime Input Method. %endif %package qt5-immodule Summary: QT5 IM Module for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description qt5-immodule This package contains qt5 im module for Hime Input Method. %package tables Summary: Tables for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description tables This package contains tables for Hime Input Method. %package icon-themes Summary: Icon Themes for Hime IM Group: System/I18n/Chinese Requires: %{name} = %{version} %description icon-themes This package contains pink/black/dark/gray themes for Hime Input Method. %prep %autosetup -p1 %build autoreconf -i %configure \ --enable-qt5-immodule \ %if %build_qt6 --enable-qt6-immodule \ --with-qt6-moc-path=%{_libexecdir}/qt6/moc \ --with-qt6-im-module-path=%{_libdir}/qt6/plugins/platforminputcontexts \ %endif --enable-anthy \ --enable-chewing \ --with-gtk=3.0 %make_build %install %make_install %if 0%{?suse_version} mkdir -pv %{buildroot}%{_sysconfdir}/X11/xim.d/ install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xim.d/%{name} pushd %{buildroot}%{_sysconfdir}/X11/xim.d/ for lang in zh_CN ja ko en do mkdir $lang pushd $lang ln -s ../%{name} 60-%{name} popd done mkdir -pv zh_TW pushd zh_TW ln -s ../%{name} 30-%{name} popd popd #fix desktop categories sed -i "15d" %{buildroot}%{_datadir}/applications/%{name}-setup.desktop echo "Categories=System;Utility;X-SuSE-DesktopUtility;" >> %{buildroot}%{_datadir}/applications/%{name}-setup.desktop %suse_update_desktop_file %{name}-setup Utility DesktopUtility %else mkdir %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d/ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d/%{name}.conf %endif rm -rf %{buildroot}%{_datadir}/doc/%{name}/ %fdupes %{buildroot} %find_lang %{name} # Convenient %define for the scriplets %if "%{_lib}" == "lib64" %define _gtk2_query_immodules %{_bindir}/gtk-query-immodules-2.0-64 %define _gtk2_query_immodules_update_cache %{_gtk2_query_immodules} > %{_sysconfdir}/gtk-2.0/gtk64.immodules %else %define _gtk2_query_immodules %{_bindir}/gtk-query-immodules-2.0 %define _gtk2_query_immodules_update_cache %{_gtk2_query_immodules} > %{_sysconfdir}/gtk-2.0/gtk.immodules %endif # Convenient %define for the scriplets %if "%{_lib}" == "lib64" %define _gtk3_query_immodules %{_bindir}/gtk-query-immodules-3.0-64 %else %define _gtk3_query_immodules %{_bindir}/gtk-query-immodules-3.0 %endif %define _gtk3_query_immodules_update_cache %{_gtk3_query_immodules} --update-cache %post gtk3-immodule %{_gtk3_query_immodules_update_cache} #Add hime icons to gnome3 panel TARGET="%{_datadir}/gnome-shell/js/ui/statusIconDispatcher.js" if [ -f $TARGET ] && [ ! -f $TARGET-hime ] ; then mv $TARGET $TARGET-hime sed "/^const STANDARD_TRAY_ICON_IMPLEMENTATIONS/a \ 'hime': 'input-method'," $TARGET-hime > $TARGET fi %postun gtk3-immodule %{_gtk3_query_immodules_update_cache} %post /sbin/ldconfig #%{_gtk2_query_immodules_update_cache} %postun /sbin/ldconfig #%{_gtk2_query_immodules_update_cache} %files -f %{name}.lang %config %{_sysconfdir}/X11/xim.d/ %{_bindir}/* #%{_libdir}/gtk-2.0/ %{_libdir}/%{name}/ %exclude %{_libdir}/%{name}/lib%{name}-im-client.so %exclude %{_libdir}/%{name}/anthy-module.so %exclude %{_libdir}/%{name}/chewing-module.so %{_datadir}/applications/%{name}-setup.desktop %dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/table/ %{_datadir}/%{name}/table/*.tab2 %{_datadir}/%{name}/table/*.xlt %{_datadir}/%{name}/table/*.idx %{_datadir}/%{name}/table/s-tsin32 %{_datadir}/%{name}/table/tsin32 %{_datadir}/%{name}/table/s2t.dat %{_datadir}/%{name}/table/t2s.dat %files data %{_datadir}/pixmaps/%{name}/ %exclude %{_datadir}/pixmaps/%{name}/black/ %exclude %{_datadir}/pixmaps/%{name}/dark/ %exclude %{_datadir}/pixmaps/%{name}/gray/ %exclude %{_datadir}/pixmaps/%{name}/pink/ %{_datadir}/pixmaps/%{name}.png %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/table/ %{_datadir}/%{name}/table/*.kbm %{_datadir}/%{name}/table/gtab.list %{_datadir}/%{name}/table/phrase.table %{_datadir}/%{name}/table/phrase-ctrl.table %{_datadir}/%{name}/table/symbol-table %{_datadir}/%{name}/table/tsin-1.src %{_datadir}/%{name}/script/ %{_datadir}/%{name}/filter/ %files doc %doc ChangeLog README.md %{_mandir}/man1/* %files devel %{_includedir}/* %{_libdir}/%{name}/lib%{name}-im-client.so %files anthy %{_libdir}/%{name}/anthy-module.so %files chewing %{_libdir}/%{name}/chewing-module.so %files gtk3-immodule %{_libdir}/gtk-3.0/ %if %build_qt6 %files qt6-immodule %{_libdir}/qt6/ %endif %files qt5-immodule %{_libdir}/qt5/ %files tables %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/table/ %{_datadir}/%{name}/table/*.gtab %files -n %{name}-icon-themes %{_datadir}/pixmaps/%{name}/pink/ %{_datadir}/pixmaps/%{name}/black/ %{_datadir}/pixmaps/%{name}/dark/ %{_datadir}/pixmaps/%{name}/gray/ %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor