File dtkwidget.spec of Package dtkwidget

# spec file for package dtkwidget
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2021 Hillwood Yang <>
# 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

%define libver 5
%define apiver 5.5.0
%define gtest_version %(rpm -q --queryformat '%%{VERSION}' gtest)

Name:           dtkwidget
Version:        5.5.52
Release:        0
Summary:        Deepin graphical user interface library
License:        LGPL-3.0-only
Group:          System/GUI/Other
# PATCH-FIX-UPSTEAM dtkwidget-fix-lost-pkgconfig.patch - fix lost pkgconfig
Patch0:         dtkwidget-fix-lost-pkgconfig.patch
BuildRequires:  dtkcommon
BuildRequires:  fdupes
BuildRequires:  gtest
BuildRequires:  libqt5-linguist
BuildRequires:  libqt5-qtbase-private-headers-devel
BuildRequires:  libqt5-qtdeclarative-devel
BuildRequires:  libqt5-qtmultimedia-devel
BuildRequires:  libqt5-qtx11extras-devel
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(dframeworkdbus)
BuildRequires:  pkgconfig(dtkcore) >= 5.5.0
BuildRequires:  pkgconfig(dtkgui) >= 5.5.0
BuildRequires:  pkgconfig(gsettings-qt)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xi)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Deepint Tool Kit (Dtk) is the base devlopment tool of all C++/Qt Developer
work on Deepin.

%package -n lib%{name}%{libver}
Summary:        Libraries for dtkwidget
Group:          System/Libraries
Recommends:     %{name}-lang

%description -n lib%{name}%{libver}
The dtkwidget-devel package contains the header files and developer
docs for dtkcore.

%package devel
Summary:        Development tools for dtkwidget
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{libver} = %{version}

%description devel
The dtkwidget-devel package contains the header files and developer
docs for dtkcore.


%autosetup -p1
%if "%{gtest_version}" >= "1.14.0"
sed -i 's|c++11|c++14|g' examples/dwidget-examples/collections/ \
plugin/dtkuidemo/ \
src/lib.pri \
src/widgets/private/keyboardmonitor/keyboardmonitor.pri \
src/widgets/private/startupnotifications/startupnotifications.pri \

        PREFIX=%{_prefix} \


# Remove useless files
rm -rf %{buildroot}/usr/tests

%fdupes %{buildroot}

%post -n lib%{name}%{libver} -p /sbin/ldconfig

%postun -n lib%{name}%{libver} -p /sbin/ldconfig

%license LICENSE
%dir %{_libdir}/examples

%files -n lib%{name}%{libver}

%files devel
%license LICENSE
%dir %{_includedir}/libdtk-*
# %{_libdir}/pkgconfig/%{name}%{pkg_ver}.pc
%dir %{_libdir}/cmake
%dir %{_libdir}/qt5
%dir %{_libdir}/qt5/mkspecs

%files lang

openSUSE Build Service is sponsored by