File dtk6gui.spec of Package dtk6gui

#
# spec file for package dtk6gui
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Hillwood Yang <hillwood@opensuse.org>
#
# 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 libver  6
%define dtkver  6

Name:           dtk6gui
Version:        6.0.44
Release:        0
Summary:        Deepin Toolkit GUI
License:        LGPL-3.0-or-later
Group:          System/GUI/Other
URL:            https://github.com/linuxdeepin/dtk6gui
Source0:        https://github.com/linuxdeepin/dtk6gui/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  doxygen
BuildRequires:  dtkcommon
BuildRequires:  fdupes
BuildRequires:  freeimage-devel
BuildRequires:  gmock
BuildRequires:  gtest
BuildRequires:  pkgconfig
BuildRequires:  qt6-gui-private-devel
BuildRequires:  qt6-platformsupport-private-devel
BuildRequires:  qt6-waylandclient-private-devel
BuildRequires:  cmake(TreelandProtocols)
BuildRequires:  pkgconfig(libraw)
BuildRequires:  pkgconfig(Qt6DBus)
BuildRequires:  pkgconfig(Qt6Concurrent)
BuildRequires:  pkgconfig(Qt6Gui)
BuildRequires:  pkgconfig(Qt6Network)
BuildRequires:  pkgconfig(Qt6Test)
BuildRequires:  pkgconfig(Qt6WaylandClient)
BuildRequires:  pkgconfig(Qt6Widgets)
BuildRequires:  pkgconfig(Qt6Xml)
BuildRequires:  pkgconfig(dtk6core) >= %{dtkver}
BuildRequires:  pkgconfig(librsvg-2.0)
%if 0%{?suse_version} < 1600
BuildRequires:  gcc13-c++
%endif

%description
A GUI module for DDE look and feel for the Deepin Toolkit.

%package -n lib%{name}%{libver}
Summary:        Deepin Toolkit GUI libraries
Group:          System/Libraries
Requires:       %{name} = %{version}

%description -n lib%{name}%{libver}
Deepint Tool Kit (Dtk) GUI is the base devlopment tool of all C++/Qt developer
work on Deepin.

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

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

You should first read the "Deepin Application Specification".

%prep
%autosetup -p1

%build
%if 0%{?suse_version} < 1600
    export CXX=g++-13
%endif
%cmake -DNOTPACKAGE=OFF \
       -DBUILD_DOCS=OFF \
       -DDTK_VERSION=%{version} \
       -DLINUXNAME="openSUSE"
%cmake_build

%install
%cmake_install

%fdupes %{buildroot}%{_includedir}

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

%files
%doc README.md
%license LICENSE
%dir %{_libexecdir}/dtk%{libver}
%dir %{_libexecdir}/dtk%{libver}/DGui
%{_libexecdir}/dtk%{libver}/DGui/bin

%files -n lib%{name}%{libver}
%{_libdir}/lib%{name}.so.*

%files devel
%doc README.md
%license LICENSE
%dir %{_includedir}/dtk%{libver}
%{_includedir}/dtk%{libver}/DGui
%{_libdir}/cmake/Dtk%{libver}Gui
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/qt6/mkspecs/modules/qt_lib_dtkgui.pri

%changelog

openSUSE Build Service is sponsored by