File mingw32-drkonqi5.spec of Package mingw32-drkonqi5
#
# spec file for package drkonqi5
#
# Copyright (c) 2020 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 kf5_version 5.103.0
%bcond_with install
%bcond_without lang
%define _name drkonqi5
Name: mingw32-%{_name}
# Full Plasma 5 version (e.g. 5.9.1)
%{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}}
# Latest ABI-stable Plasma (e.g. 5.8 in KF5, but 5.9.1 in KUF)
%{!?_plasma5_version: %define _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')}
Version: 5.19.5
Release: 0
Summary: Helper for debugging and reporting crashes
License: GPL-2.0-or-later
Group: Development/Tools/Debuggers
URL: http://www.kde.org/
Source: drkonqi-%{version}.tar.xz
%if %{with lang}
Source1: drkonqi-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
Patch0: 0001-Fix-not-having-provided-method-QRegularExpression-an.patch
Patch1: 0001-Install-drkonqi-as-drkonqi5-on-Windows-to-avoid-conf.patch
Patch2: 0001-Using-a-different-set-of-the-external-debugger-confi.patch
Patch3: 0001-Install-kdbgwin-as-kdbgwin5-on-Windows.patch
# PATCHES 100-199 are from upstream 5.16 branch
# PATCHES 200-299 and above are from upstream master/5.17+ branch
BuildRequires: mingw32-binutils-devel
BuildRequires: mingw32-extra-cmake-modules >= 1.8.0
BuildRequires: mingw32-libintl-devel
BuildRequires: mingw32(cmake:KDEWin)
BuildRequires: mingw32(cmake:KF5Completion) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5ConfigWidgets) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5CoreAddons) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5Crash) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5I18n) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5IdleTime) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5JobWidgets) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5KIO) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5Notifications) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5Service) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5SyntaxHighlighting) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5Wallet) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5WidgetsAddons) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5WindowSystem) >= %{kf5_version}
BuildRequires: mingw32(cmake:KF5XmlRpcClient) >= %{kf5_version}
BuildRequires: mingw32(cmake:Qt5Concurrent)
BuildRequires: mingw32(cmake:Qt5Core) >= 5.11.0
BuildRequires: mingw32(cmake:Qt5DBus)
BuildRequires: mingw32(cmake:Qt5Test)
BuildRequires: mingw32(cmake:Qt5Widgets)
BuildRequires: mingw32(cmake:Qt5WinExtras)
BuildRequires: mingw32(pkg:zlib)
# We want useful backtraces
Recommends: mingw32-gdb
# we want symbol install support
Recommends: mingw32-ptools
Recommends: %{name}-lang
%_mingw32_package_header_debug
BuildArch: noarch
%description
The KDE Crash Handler gives the user feedback if a program has crashed.
%lang_package
%_mingw32_debug_package
%prep
%setup -q -n drkonqi-%{version}
%autopatch -p1
%build
CXXFLAGS="%_mingw32_cxxflags -Wno-narrowing"
%_mingw32_cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_mingw32_kf5_localedir}
%_mingw32_cmake_build
%install
%_mingw32_kf5_makeinstall -C build
# Fix mingw32-drkonqi5.noarch: W: script-without-shebang
chmod a-x %{buildroot}%{_mingw32_kf5_applicationsdir}/org.kde.drkonqi.desktop
%if %{with lang}
%_mingw32_kf5_find_lang %{_name}
%endif
%if %{with install}
install -p -D -m755 src/doc/examples/installdbgsymbols_suse.sh \
%{buildroot}%{_mingw32_kf5_bindir}/installdbgsymbols.sh
%endif
%files
%license COPYING*
%if %{with install}
%{_mingw32_kf5_bindir}/installdbgsymbols.sh
%endif
%{_mingw32_kf5_bindir}/drkonqi5.exe
%{_mingw32_kf5_bindir}/kdbgwin5.exe
%{_mingw32_kf5_sharedir}/drkonqi/
%{_mingw32_kf5_applicationsdir}/org.kde.drkonqi.desktop
%{_mingw32_kf5_configdir}/drkonqi.categories
%{_mingw32_kf5_debugdir}/drkonqi.categories
%if %{with lang}
%files lang -f %{_name}.lang
%endif
%changelog