File dtk6core.spec of Package dtk6core
#
# spec file for package dtk6core
#
# 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
Name: dtk6core
Version: 6.0.44
Release: 0
Summary: Deepin Tool Kit Core
License: LGPL-3.0-or-later
Group: System/GUI/Other
URL: https://github.com/linuxdeepin/dtk6core
Source0: https://github.com/linuxdeepin/dtk6core/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: doxygen
BuildRequires: dtkcommon
BuildRequires: fdupes
BuildRequires: graphviz-devel
BuildRequires: qt6-core-private-devel
BuildRequires: qt6-dbus-private-devel
BuildRequires: gtest
BuildRequires: pkgconfig(dtk6log)
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(uchardet)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(Qt6Help)
%if 0%{?suse_version} < 1600
BuildRequires: gcc13-c++
%endif
%description
Deepin Tool Kit (DtkCore) is the base development tool of all C++/Qt Developer
work on Deepin.
%package -n lib%{name}%{libver}
Summary: Deepin Toolkit Core libraries
Group: System/Libraries
Requires: deepin-desktop-base
Recommends: qt6integration
%description -n lib%{name}%{libver}
Deepint Tool Kit (Dtk) is the base devlopment tool of all C++/Qt Developer work
on Deepin.
%package devel
Summary: Development tools for dtk6core
Group: Development/Languages/C and C++
Requires: dtkcommon
Requires: lib%{name}%{libver} = %{version}
%description devel
The dtk6core-devel package contains the header files and developer
docs for dtk6core.
You shoud firstly read the "Deepin Application Specification".
%prep
%autosetup -p1
sed -i 's|/etc/os-version|/etc/dde-version|' src/dsysinfo.cpp
%build
%if 0%{?suse_version} < 1600
export CXX=g++-13
%endif
%cmake -DDTK_VERSION=%{version}
%cmake_build
%install
%cmake_install
# 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
%files
%defattr(-,root,root,-)
%doc README.md CHANGELOG.md
%license LICENSE
%dir %{_libexecdir}/dtk%{libver}
%{_libexecdir}/dtk%{libver}/DCore
%files -n lib%{name}%{libver}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/Dtk%{libver}*
%{_libdir}/qt6/mkspecs/modules/qt_lib_dtkcore.pri
%{_libdir}/qt6/mkspecs/features/dtk_install_dconfig.prf
%{_includedir}/dtk%{libver}
%changelog