SHA256
1
0
forked from pool/fcitx
Dominique Leuenberger 2017-04-30 19:10:03 +00:00 committed by Git OBS Bridge
commit fd57a05e2c
2 changed files with 22 additions and 117 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Apr 21 12:12:12 UTC 2017 - fvogt@suse.com
- Clean up .spec file:
* Remove KDE4 parts (install custom systray icon)
* Remove checks for obsolete distro versions
-------------------------------------------------------------------
Sun Nov 13 15:25:00 UTC 2016 - toddrme2178@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package fcitx
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libver -4_2_9
Name: fcitx
@ -40,49 +41,33 @@ Patch3: fcitx-autostart-desktop-no-display.patch
# PATCH-FIX-UPSTREAM boo#964623
Patch4: boo954623.patch
BuildRequires: cairo-devel
BuildRequires: cmake
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: enchant-devel
BuildRequires: iso-codes-devel
BuildRequires: update-desktop-files
# Directory ownership start
BuildRequires: kde4-filesystem
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} <= 1320
BuildRequires: kdebase4-runtime-branding-openSUSE
%endif
# Directory ownership end
BuildRequires: libpresage-devel
BuildRequires: pango-devel
%if 0%{?suse_version} >= 1110
BuildRequires: fdupes
%endif
%if 0%{?suse_version} > 1110
BuildRequires: libqt4-devel
%endif
BuildRequires: cmake
BuildRequires: extra-cmake-modules
BuildRequires: gtk2-devel
BuildRequires: opencc-devel
BuildRequires: pkgconfig(lua)
%if 0%{?suse_version} >= 1140
BuildRequires: gobject-introspection-devel
BuildRequires: gtk3-devel
%endif
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gobject-introspection-devel
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: hicolor-icon-theme
BuildRequires: iso-codes-devel
BuildRequires: libicu-devel
BuildRequires: libpresage-devel
BuildRequires: libqt4-devel
BuildRequires: libxml2-devel
BuildRequires: opencc-devel
BuildRequires: pango-devel
BuildRequires: pkg-config
BuildRequires: update-desktop-files
BuildRequires: xz
BuildRequires: pkgconfig(lua)
BuildRequires: pkgconfig(xkbcommon) >= 0.5.0
Requires: %{name}-gtk2 = %{version}-%{release}
Requires: lib%{name}%{libver} = %{version}-%{release}
%if 0%{?suse_version} >= 1140
Requires: %{name}-gtk3 = %{version}-%{release}
%endif
%if 0%{?suse_version} > 1110
Requires: %{name}-qt4 = %{version}-%{release}
%endif
Requires: lib%{name}%{libver} = %{version}-%{release}
Recommends: %{name}-pinyin = %{version}-%{release}
Recommends: %{name}-table = %{version}-%{release}
# These libraries are dlopen-ed in fcitx at runtime
@ -120,18 +105,11 @@ Development header files for Fcitx input method framework.
Summary: Gtk2 IM module for %{name}
Group: System/I18n/Chinese
Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} >= 1140
%gtk2_immodule_requires
%else
Requires(post): gtk2
Requires(postun): gtk2
%endif
%description gtk2
GTK+ version 2 input module for Fcitx input method rfamework.
%if 0%{?suse_version} >= 1140
%package gtk3
Summary: Gtk3 IM module for %{name}
Group: System/I18n/Chinese
@ -151,10 +129,6 @@ Pinyin and QuWei input methods. It's flexible and fast.
This package provides the GObject Introspection bindings for Fcitx.
%endif
%if 0%{?suse_version} > 1110
%package qt4
Summary: Qt4 IM module for %{name}
Group: System/I18n/Chinese
@ -163,8 +137,6 @@ Requires: %{name} = %{version}-%{release}
%description qt4
QT4 input module for Fcitx input method framework.
%endif
%package quwei
Summary: Chinese Zone-bit(QuWei) engine for %{name}
Group: System/I18n/Chinese
@ -195,9 +167,7 @@ It's the basic component for other users except some Chinese.
Summary: Simplified Chinese Tsang-Jei(Cangjie) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-cangjie
Fcitx Tsang Jei (Cang Jie) input tables for Simplified Chinese.
@ -206,9 +176,7 @@ Fcitx Tsang Jei (Cang Jie) input tables for Simplified Chinese.
Summary: Telegram(Dianbao) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-dianbao
Fcitx Telegram (Dian Bao) input tables for Simplified Chinese.
@ -217,9 +185,7 @@ Fcitx Telegram (Dian Bao) input tables for Simplified Chinese.
Summary: Two stroke(Erbi) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-erbi
Fcitx Two Stroke (Er Bi) input tables for Simplified Chinese.
@ -228,9 +194,7 @@ Fcitx Two Stroke (Er Bi) input tables for Simplified Chinese.
Summary: Icefrog Holography(QXM) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-bingchan
Fcitx Icefrog Holography (Bing Chan Quan Xi, or QXM) input tables for Simplified Chinese.
@ -239,9 +203,7 @@ Fcitx Icefrog Holography (Bing Chan Quan Xi, or QXM) input tables for Simplified
Summary: Evening Breeze(Wanfeng) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-wanfeng
Fcitx Evening Breeze (Wan feng) input tables for Simplified Chinese.
@ -251,9 +213,7 @@ Summary: Wubi and pinyin(wubi-pinyin) table for %{name}
Group: System/I18n/Chinese
Provides: locale(fcitx-table:zh_CN;)
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-wubi-pinyin
Fcitx Wubi (Wu Bi Zi Xing) and Pinyin mixed input tables for Simplified Chinese.
@ -265,9 +225,7 @@ Summary: Wubi table for %{name}
Group: System/I18n/Chinese
Provides: locale(fcitx-table:zh_CN;)
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-wubi
Fcitx Wubi (Wu Bi Zi Xing) input tables for Simplified Chinese.
@ -278,9 +236,7 @@ Wubi in Fcitx is based on wubi x86.
Summary: Nature(Ziran) table for %{name}
Group: System/I18n/Chinese
Requires: %{name}-table = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description table-cn-ziran
Fcitx Nature (Zi Ran Ma) input tables for Simplified Chinese.
@ -307,9 +263,7 @@ Tools to convert txt or scel(sougou pinyin data format) pinyin sheets to fcitx m
Summary: openSUSE default Skins for Fcitx
Group: System/I18n/Chinese
Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
Provides: %{name}-branding = %{version}
Conflicts: otherproviders(%{name}-branding)
Supplements: packageand(%{name}:branding-openSUSE)
@ -323,9 +277,7 @@ You can either use this package or download from kde-look.org using knewstaff in
Summary: New Air skin for Fcitx
Group: System/I18n/Chinese
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description skin-new-air
New Air skin for Fcitx, inspired by KDE Air theme.
@ -337,9 +289,7 @@ fcitx-config-kde4.
Summary: Fcitx Classic Skin
Group: System/I18n/Chinese
Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description skin-classic
Fcitx classic skin.
@ -350,9 +300,7 @@ You can either use this package or download from kde-look.org using knewstaff in
Summary: Fcitx Dark Skin
Group: System/I18n/Chinese
Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} >= 1140
BuildArch: noarch
%endif
%description skin-dark
Fcitx dark skin.
@ -367,14 +315,6 @@ You can either use this package for download from kde-look.org using knewstaff i
%patch3 -p1
%patch4 -p1
# hack to fix incompatibility of gtk-query-immodules-2.0 (bnc#845860)
%if %suse_version < 1310
sed -i \
-e's@\(gtk-query-immodules-2.0-64\) --update-cache@\1 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules@g' \
-e's@\(gtk-query-immodules-2.0\) --update-cache@\1 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules@g' \
$RPM_SOURCE_DIR/baselibs.conf
%endif
%build
mkdir build
cd build
@ -388,12 +328,7 @@ cmake .. \
-DOPENCC_LIBRARY_FILENAME=libopencc.so.2 \
-DENCHANT_LIBRARY_FILENAME=libenchant.so.1 \
-DPRESAGE_LIBRARY_FILENAME=libpresage.so.1 \
%if 0%{?suse_version} >= 1140
-DENABLE_GTK3_IM_MODULE=On \
%endif
%if 0%{?suse_version} <= 1210
-DENABLE_QT_GUI=Off \
%endif
%if 0%{?sles_version}
-DENABLE_QT=Off \
-DENABLE_QT_IM_MODULE=off \
@ -418,14 +353,6 @@ mv openSUSE-themes/Harlequin %{buildroot}%{_datadir}/%{name}/skin/
mv openSUSE-themes/Dartmouth %{buildroot}%{_datadir}/%{name}/skin/
mv openSUSE-themes/NewAir %{buildroot}%{_datadir}/%{name}/skin/
%if 0%{?sle_version} == 120100 && 0%{?is_opensuse} == 1 || 0%{?suse_version} == 1320 || 0%{?suse_version} <= 1310
# fcitx 4.2.8 use new dbus systray mechanism, so fix the ugly oxygen keyboard icon
mkdir -p %{buildroot}%{_kde4_appsdir}/desktoptheme/openSUSE/icons/
mkdir -p %{buildroot}%{_kde4_appsdir}/desktoptheme/openSUSElight/icons/
cp -r openSUSE-themes/input-Dartmouth.svgz %{buildroot}%{_kde4_appsdir}/desktoptheme/openSUSE/icons/input.svgz
cp -r openSUSE-themes/input-Harlequin.svgz %{buildroot}%{_kde4_appsdir}/desktoptheme/openSUSElight/icons/input.svgz
%endif
# Change default skin
pushd %{buildroot}%{_datadir}/%{name}/configdesc
sed -i 's/DefaultValue=default/DefaultValue=Harlequin/' %{buildroot}%{_datadir}/%{name}/configdesc/fcitx-classic-ui.desc
@ -468,9 +395,7 @@ install -D -m644 %{SOURCE9} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
%find_lang %{name}
%if 0%{?suse_version} >= 1110
%fdupes %{buildroot}
%endif
%post gtk2
%gtk2_immodule_post
@ -478,8 +403,6 @@ install -D -m644 %{SOURCE9} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
%postun gtk2
%gtk2_immodule_postun
%if 0%{?suse_version} >= 1140
%post gtk3
%gtk3_immodule_post
@ -493,8 +416,6 @@ fi
%postun gtk3
%gtk3_immodule_postun
%endif
%post
%desktop_database_post
%icon_theme_cache_post
@ -561,8 +482,6 @@ exit 0
%defattr(-,root,root)
%{_libdir}/gtk-2.0/*
%if 0%{?suse_version} >= 1140
%files gtk3
%defattr(-,root,root)
%{_libdir}/gtk-3.0/*
@ -571,8 +490,6 @@ exit 0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Fcitx-1.0.typelib
%endif
%files quwei
%defattr(-,root,root)
%{_libdir}/%{name}/%{name}-qw.so
@ -657,19 +574,6 @@ exit 0
%defattr(-,root,root)
%{_datadir}/%{name}/skin/Harlequin
%{_datadir}/%{name}/skin/Dartmouth
%if 0%{?sle_version} == 120100 && 0%{?is_opensuse} == 1 || 0%{?suse_version} == 1320 || 0%{?suse_version} <= 1310
%{_kde4_appsdir}/desktoptheme/openSUSE/icons/input.svgz
%{_kde4_appsdir}/desktoptheme/openSUSElight/icons/input.svgz
%if 0%{?suse_version} <= 1310
%dir %{_kde4_appsdir}/desktoptheme/openSUSElight
%dir %{_kde4_appsdir}/desktoptheme/openSUSElight/icons
%if 0%{?suse_version} <= 1220
%dir %{_kde4_appsdir}/desktoptheme
%dir %{_kde4_appsdir}/desktoptheme/openSUSE
%dir %{_kde4_appsdir}/desktoptheme/openSUSE/icons
%endif
%endif
%endif
%files skin-new-air
%defattr(-,root,root)
@ -693,16 +597,10 @@ exit 0
%{_libdir}/%{name}/libexec/fcitx-scanner
%{_libdir}/pkgconfig/*.pc
%{_datadir}/cmake/
%if 0%{?suse_version} >= 1140
%{_datadir}/gir-1.0/Fcitx-1.0.gir
%endif
%if 0%{?suse_version} > 1110
%files qt4
%defattr(-,root,root)
%{_libdir}/qt4/*
%endif
%changelog