## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    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 repo qt5platform-plugins
%global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$

Name:           deepin-qt5platform-plugins
Version:        5.6.32
Release:        %autorelease
Summary:        Qt platform integration plugins for Deepin Desktop Environment
License:        LGPL-3.0-or-later
URL:            https://github.com/linuxdeepin/qt5platform-plugins
Source0:        %{url}/archive/%{version}/%{repo}-%{version}.tar.gz

BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  extra-cmake-modules

BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5XcbQpa)
BuildRequires:  cmake(Qt5X11Extras)
BuildRequires:  cmake(Qt5EdidSupport)
BuildRequires:  cmake(Qt5XkbCommonSupport)

BuildRequires:  pkgconfig(x11-xcb)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xcb-renderutil)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(xcb-render)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-image)
BuildRequires:  pkgconfig(xcb-icccm)
BuildRequires:  pkgconfig(xcb-sync)
BuildRequires:  pkgconfig(xcb-xfixes)
BuildRequires:  pkgconfig(xcb-shm)
BuildRequires:  pkgconfig(xcb-randr)
BuildRequires:  pkgconfig(xcb-shape)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xcb-xkb)
BuildRequires:  pkgconfig(xcb-composite)
BuildRequires:  pkgconfig(xkbcommon-x11)
BuildRequires:  pkgconfig(xcb-damage)
BuildRequires:  pkgconfig(xcb-xinerama)
BuildRequires:  pkgconfig(mtdev)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(xkbcommon)

BuildRequires:  qt5-qtbase-static
BuildRequires:  qt5-qtbase-private-devel
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}

Provides:       deepin-qt5dxcb-plugin = %{version}-%{release}
Provides:       deepin-qt5dxcb-plugin%{?_isa} = %{version}-%{release}
Obsoletes:      deepin-qt5dxcb-plugin < 5.0.21

%description
qt5platform-plugins is the Qt platform integration plugin for Deepin Desktop
Environment.

%prep
%autosetup -p1 -n %{repo}-%{version}

# https://github.com/linuxdeepin/developer-center/issues/7217
# remove wayland support
sed -i '/wayland/d' CMakeLists.txt

# remove redundant bundled code
rm -r xcb/{libqt5xcbqpa-dev,libqt6xcbqpa-dev}

%build
%cmake \
    -DQT_XCB_PRIVATE_HEADERS=%{_qt5_headerdir}/QtXcb \
    -DBUILD_TESTING=OFF
%cmake_build

%install
%cmake_install

%files
%doc CHANGELOG.md README.md
%license LICENSE
%{_qt5_plugindir}/platforms/libdxcb.so

%changelog
## START: Generated by rpmautospec
* Wed Aug 14 2024 Felix Wang <topazus@outlook.com> - 5.6.32-2
- disable wayland

* Wed Aug 07 2024 Felix Wang <topazus@outlook.com> - 5.6.32-1
- 5.6.32

* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.12-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Thu May 30 2024 Jan Grulich <jgrulich@redhat.com> - 5.6.12-7
- Rebuild (qt5)

* Fri Mar 15 2024 Jan Grulich <jgrulich@redhat.com> - 5.6.12-6
- Rebuild (qt5)

* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Wed Jan 03 2024 Jan Grulich <jgrulich@redhat.com> - 5.6.12-3
- Rebuild (qt5)

* Mon Oct 09 2023 Jan Grulich <jgrulich@redhat.com> - 5.6.12-2
- Rebuild (qt5)

* Sat Aug 19 2023 Robin Lee <cheeselee@fedoraproject.org> - 5.6.12-1
- New release 5.6.12

* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.59.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Wed Jun 14 2023 Jan Grulich <jgrulich@redhat.com> - 5.0.59.1-7
- Rebuild (qt5)

* Wed Apr 12 2023 Jan Grulich <jgrulich@redhat.com> - 5.0.59.1-6
- Rebuild (qt5)

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.59.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Jan 06 2023 Jan Grulich <jgrulich@redhat.com> - 5.0.59.1-4
- Rebuild (qt5)

* Mon Oct 31 2022 Jan Grulich <jgrulich@redhat.com> - 5.0.59.1-3
- Rebuild (qt5)

* Wed Sep 21 2022 Jan Grulich <jgrulich@redhat.com> - 5.0.59.1-2
- Rebuild (qt5)

* Mon Aug 22 2022 Robin Lee <cheeselee@fedoraproject.org> - 5.0.59.1-1
- Update to 5.0.59.1

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.59-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Thu Jul 14 2022 Jan Grulich <jgrulich@redhat.com> - 5.0.59-3
- Rebuild (qt5)

* Tue May 17 2022 Jan Grulich <jgrulich@redhat.com> - 5.0.59-2
- Rebuild (qt5)

* Tue Apr 19 2022 Robin Lee <cheeselee@fedoraproject.org> - 5.0.59-1
- New release 5.0.59

* Tue Mar 08 2022 Jan Grulich <jgrulich@redhat.com> - 5.0.46-2
- Rebuild (qt5)

* Fri Feb 18 2022 Robin Lee <cheeselee@fedoraproject.org> - 5.0.46-1
- New release 5.0.46

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.42-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Thu Dec 30 2021 Robin Lee <cheeselee@fedoraproject.org> - 5.0.42-1
- New release 5.0.42

* Tue Sep 07 2021 Robin Lee <cheeselee@fedoraproject.org> - 5.0.40-1
- New release 5.0.40

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.21-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Nov 25 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.0.21-4
- rebuild (qt5)

* Thu Nov 19 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.0.21-3
- Provides deepin-qt5dxcb-plugin%%{?_isa}

* Sat Nov 14 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.0.21-2
- Filter private so from Provides

* Fri Nov 13 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.0.21-1
- Review request for rename from deepin-qt5dxcb-plugin

## END: Generated by rpmautospec