Blame packages/f/fcitx5-qt/fcitx5-qt.spec

d4bd66
#
d4bd66
# spec file for package fcitx5-qt
d4bd66
#
Bernhard M. Wiedemann 698dcb
# Copyright (c) 2022 SUSE LLC
d4bd66
#
d4bd66
# All modifications and additions to the file contributed by third parties
d4bd66
# remain the property of their copyright owners, unless otherwise agreed
d4bd66
# upon. The license for this file, and modifications and additions to the
d4bd66
# file, is the same license as for the pristine package itself (unless the
d4bd66
# license for the pristine package is not an Open Source License, in which
d4bd66
# case the license is the MIT License). An "Open Source License" is a
d4bd66
# license that conforms to the Open Source Definition (Version 1.9)
d4bd66
# published by the Open Source Initiative.
d4bd66
Bernhard M. Wiedemann 698dcb
# Please submit bugfixes or comments via https://bugs.opensuse.org/
d4bd66
#
d4bd66
Bernhard M. Wiedemann 698dcb
d4bd66
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150200
d4bd66
%define build_qt4 1
d4bd66
%else
d4bd66
%define build_qt4 0
d4bd66
%endif
d4bd66
d4bd66
%if 0%{?suse_version} >= 1550
d4bd66
%define build_qt6 1
d4bd66
%else
d4bd66
%define build_qt6 0
d4bd66
%endif
d4bd66
d4bd66
Name:           fcitx5-qt
Bernhard M. Wiedemann 698dcb
Version:        5.0.10
d4bd66
Release:        0
d4bd66
Summary:        Qt library and IM module for fcitx5
Bernhard M. Wiedemann 698dcb
License:        BSD-3-Clause AND LGPL-2.1-or-later
Bernhard M. Wiedemann 698dcb
Group:          System/I18n/Chinese
Bernhard M. Wiedemann 698dcb
URL:            https://github.com/fcitx/fcitx5-qt
d4bd66
Source:         https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}.tar.xz
d4bd66
Patch:          %{name}-5.9.patch
d4bd66
BuildRequires:  cmake
d4bd66
BuildRequires:  extra-cmake-modules
Bernhard M. Wiedemann 698dcb
BuildRequires:  gcc-c++
d4bd66
%if %build_qt4
d4bd66
BuildRequires:  libqt4-devel
d4bd66
%endif
d4bd66
BuildRequires:  libqt5-qtbase-devel
d4bd66
BuildRequires:  libqt5-qtbase-private-headers-devel
Bernhard M. Wiedemann 698dcb
BuildRequires:  libqt5-qtx11extras-devel
d4bd66
%if %build_qt6
d4bd66
BuildRequires:  qt6-base-devel
d4bd66
BuildRequires:  qt6-base-private-devel
d4bd66
%endif
Bernhard M. Wiedemann 698dcb
BuildRequires:  fcitx5-devel
d4bd66
BuildRequires:  libxcb-devel
d4bd66
BuildRequires:  libxkbcommon-devel
d4bd66
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
d4bd66
d4bd66
%description
d4bd66
Qt library and IM module for fcitx5.
d4bd66
d4bd66
%if %build_qt4
d4bd66
%package -n fcitx5-qt4
d4bd66
Summary:        Qt4 IM module for Fcitx5
d4bd66
Group:          System/I18n/Chinese
d4bd66
Provides:       fcitx-qt4 = %{version}
d4bd66
Obsoletes:      fcitx-qt4 <= 4.2.9.8
d4bd66
Supplements:    (fcitx5 and libqt4)
d4bd66
d4bd66
%description -n fcitx5-qt4
d4bd66
Qt4 IM module for Fcitx5.
d4bd66
d4bd66
%package -n libFcitx5Qt4DBusAddons1
d4bd66
Summary:        Qt4 DBus Addons library for Fcitx5
d4bd66
Group:          System/Libraries
d4bd66
d4bd66
%description -n libFcitx5Qt4DBusAddons1
d4bd66
This package provides Qt4 DBus Addons library for Fcitx5.
d4bd66
%endif
d4bd66
d4bd66
%if %build_qt6
d4bd66
%package -n fcitx5-qt6
d4bd66
Summary:        Qt6 IM module for Fcitx5
d4bd66
Group:          System/I18n/Chinese
d4bd66
Supplements:    (fcitx5 and libQt6Core6)
d4bd66
d4bd66
%description -n fcitx5-qt6
d4bd66
Qt6 IM module for Fcitx5.
d4bd66
d4bd66
%package -n libFcitx5Qt6DBusAddons1
d4bd66
Summary:        Qt6 DBus Addons library for Fcitx5
d4bd66
Group:          System/Libraries
d4bd66
d4bd66
%description -n libFcitx5Qt6DBusAddons1
d4bd66
This package provides Qt6 DBus Addons library for Fcitx5.
d4bd66
%endif
d4bd66
d4bd66
%package -n fcitx5-qt5
d4bd66
Summary:        Qt5 IM module for Fcitx5
d4bd66
Group:          System/I18n/Chinese
d4bd66
Provides:       fcitx-qt5 = %{version}
d4bd66
Obsoletes:      fcitx-qt5 <= 1.2.5
d4bd66
Supplements:    (fcitx5 and libqt5-qtbase)
d4bd66
d4bd66
%description -n fcitx5-qt5
d4bd66
Qt5 IM module for Fcitx5.
d4bd66
d4bd66
%package -n libFcitx5Qt5DBusAddons1
d4bd66
Summary:        Qt5 DBus Addons library for Fcitx5
d4bd66
Group:          System/Libraries
d4bd66
d4bd66
%description -n libFcitx5Qt5DBusAddons1
d4bd66
This package provides Qt5 DBus Addons library for Fcitx5.
d4bd66
d4bd66
%package -n libFcitx5Qt5WidgetsAddons2
d4bd66
Summary:        Qt5 Widgets Addons library for Fcitx5
d4bd66
Group:          System/Libraries
d4bd66
d4bd66
%description -n libFcitx5Qt5WidgetsAddons2
d4bd66
This package provides Qt5 Widgets Addons library for Fcitx5.
d4bd66
d4bd66
%package devel
Bernhard M. Wiedemann 698dcb
Summary:        Development files for fcitx5-qt
Bernhard M. Wiedemann 698dcb
Group:          Development/Libraries/C and C++
d4bd66
%if %build_qt4
Bernhard M. Wiedemann 698dcb
Requires:       fcitx5-qt4 = %{version}
Bernhard M. Wiedemann 698dcb
Requires:       libFcitx5Qt4DBusAddons1 = %{version}
d4bd66
%endif
Bernhard M. Wiedemann 698dcb
Requires:       fcitx5-qt5 = %{version}
Bernhard M. Wiedemann 698dcb
Requires:       libFcitx5Qt5DBusAddons1 = %{version}
Bernhard M. Wiedemann 698dcb
Requires:       libFcitx5Qt5WidgetsAddons2 = %{version}
d4bd66
%if %build_qt6
Bernhard M. Wiedemann 698dcb
Requires:       fcitx5-qt6 = %{version}
Bernhard M. Wiedemann 698dcb
Requires:       libFcitx5Qt6DBusAddons1 = %{version}
d4bd66
%endif
d4bd66
d4bd66
%description devel
d4bd66
This package provides development files for fcitx5-qt.
d4bd66
d4bd66
%prep
d4bd66
%setup -q
d4bd66
%autopatch -p1
d4bd66
d4bd66
%build
d4bd66
ARGS=""
d4bd66
%if !%build_qt4
d4bd66
ARGS="$ARGS -DENABLE_QT4=OFF"
d4bd66
%endif
d4bd66
%if %build_qt6
d4bd66
ARGS="$ARGS -DENABLE_QT6=ON"
d4bd66
%endif
d4bd66
%cmake -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} $ARGS
d4bd66
make %{?_smp_mflags}
d4bd66
d4bd66
%install
d4bd66
%cmake_install
d4bd66
%find_lang %{name}
d4bd66
d4bd66
%if %build_qt4
d4bd66
%post -n libFcitx5Qt4DBusAddons1 -p /sbin/ldconfig
d4bd66
%postun -n libFcitx5Qt4DBusAddons1 -p /sbin/ldconfig
d4bd66
%endif
d4bd66
%post -n libFcitx5Qt5DBusAddons1 -p /sbin/ldconfig
d4bd66
%post -n libFcitx5Qt5WidgetsAddons2 -p /sbin/ldconfig
d4bd66
%postun -n libFcitx5Qt5DBusAddons1 -p /sbin/ldconfig
d4bd66
%postun -n libFcitx5Qt5WidgetsAddons2 -p /sbin/ldconfig
d4bd66
%if %build_qt6
d4bd66
%post -n libFcitx5Qt6DBusAddons1 -p /sbin/ldconfig
d4bd66
%postun -n libFcitx5Qt6DBusAddons1 -p /sbin/ldconfig
d4bd66
%endif
d4bd66
d4bd66
%files -n fcitx5-qt5 -f %{name}.lang
d4bd66
%defattr(-,root,root)
d4bd66
%doc README.md
d4bd66
%license LICENSES
d4bd66
%{_libexecdir}/fcitx5-qt5-gui-wrapper
d4bd66
%{_fcitx5_qt5dir}/libfcitx-quickphrase-editor5.so
d4bd66
%{_libdir}/qt5/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so
d4bd66
d4bd66
%if %build_qt6
d4bd66
%files -n fcitx5-qt6
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so
d4bd66
d4bd66
%files -n libFcitx5Qt6DBusAddons1
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/libFcitx5Qt6DBusAddons.so.1
d4bd66
%{_libdir}/libFcitx5Qt6DBusAddons.so.%{version}
d4bd66
%endif
d4bd66
d4bd66
%if %build_qt4
d4bd66
%files -n fcitx5-qt4
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/qt4/plugins/inputmethods/libqtim-fcitx5.so
d4bd66
d4bd66
%files -n libFcitx5Qt4DBusAddons1
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/libFcitx5Qt4DBusAddons.so.1
d4bd66
%{_libdir}/libFcitx5Qt4DBusAddons.so.%{version}
d4bd66
%endif
d4bd66
d4bd66
%files -n libFcitx5Qt5DBusAddons1
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/libFcitx5Qt5DBusAddons.so.1
d4bd66
%{_libdir}/libFcitx5Qt5DBusAddons.so.%{version}
d4bd66
d4bd66
%files -n libFcitx5Qt5WidgetsAddons2
d4bd66
%defattr(-,root,root)
d4bd66
%{_libdir}/libFcitx5Qt5WidgetsAddons.so.2
d4bd66
%{_libdir}/libFcitx5Qt5WidgetsAddons.so.%{version}
d4bd66
d4bd66
%files devel
d4bd66
%defattr(-,root,root)
d4bd66
%if %build_qt4
d4bd66
%{_includedir}/Fcitx5Qt4
d4bd66
%{_libdir}/libFcitx5Qt4DBusAddons.so
d4bd66
%{_libdir}/cmake/Fcitx5Qt4DBusAddons
d4bd66
%endif
d4bd66
%{_includedir}/Fcitx5Qt5
d4bd66
%{_libdir}/cmake/Fcitx5Qt5DBusAddons
d4bd66
%{_libdir}/cmake/Fcitx5Qt5WidgetsAddons
d4bd66
%{_libdir}/libFcitx5Qt5DBusAddons.so
d4bd66
%{_libdir}/libFcitx5Qt5WidgetsAddons.so
d4bd66
%if %build_qt6
d4bd66
%{_includedir}/Fcitx5Qt6
d4bd66
%{_libdir}/libFcitx5Qt6DBusAddons.so
d4bd66
%{_libdir}/cmake/Fcitx5Qt6DBusAddons
d4bd66
%endif
d4bd66
d4bd66
%changelog