File dtk6declarative.spec of Package dtk6declarative
#
# spec file for package dtk6declarative
#
# Copyright (c) 2024 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 http://bugs.opensuse.org/
#
%define sover 6
%define dtkver %{sover}
Name: dtk6declarative
Version: 6.0.44
Release: 0
License: LGPL-3.0-or-later
Summary: Deepin widget development toolkit based on QtQuick/QtQml
Url: https://github.com/linuxdeepin/dtk6declarative
Group: System/GUI/Other
Source: https://github.com/linuxdeepin/dtk6declarative/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-wrong-path.patch hillwood@opensuse.org - Fix wrong paths
Patch0: fix-wrong-paths.patch
BuildRequires: fdupes
BuildRequires: qt6-tools-helpgenerators
BuildRequires: qt6-quickcontrols2-private-devel
BuildRequires: qt6-declarative-private-devel
BuildRequires: qt6-tools-linguist
BuildRequires: gtest
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: dtkcommon
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6ToolsTools)
BuildRequires: pkgconfig(dtk6widget) >= 6.0.0
BuildRequires: pkgconfig(dtk6core) >= 6.0.0
BuildRequires: pkgconfig(dtk6gui) >= 6.0.0
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(spdlog)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Quick)
BuildRequires: pkgconfig(Qt6Qml)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(Qt6Help)
BuildRequires: pkgconfig(Qt6ShaderTools)
%if 0%{?suse_version} < 1600
BuildRequires: gcc13-c++
%endif
# Cannot allocate memory on 32bit
ExcludeArch: %ix86
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
dtkdeclarative is a widget development toolkit based on QtQuick/QtQml, which is
a brand new substitute for dtkwidget. dtkdeclarative is developed based on
qtdeclarative. It covers all existing QML widgets and adds plenty of DTK
friendly visual effects and color schemes. Compared to dtkwidget.
%package -n lib%{name}%{sover}
Summary: Deepin libraries
Group: System/Libraries
%description -n lib%{name}%{sover}
The package provides libraries for dtkdeclarative.
%package -n %{name}-qml-qt6
Summary: Qt 6 dtk6declarative QML files and plugins
Requires: lib%{name}%{sover} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
%description -n %{name}-qml-qt6
QML files and plugins from the Qt 6 dtk6declarative module.
%package devel
Summary: Development tools for dtkdeclarative
Group: Development/Libraries/C and C++
Requires: lib%{name}%{sover} = %{version}-%{release}
%description devel
The dtkdeclarative-devel package contains the header files for
dtkdeclarative-turbo.
%lang_package
%prep
%setup -q
%patch -P 0 -p1
%patch -P 1 -p1
%build
%if 0%{?suse_version} < 1600
export CXX=g++-13
%endif
%cmake -DINCLUDE_INSTALL_DIR=%{_includedir}/dtk%{dtkver}/DDeclarative \
-DDTK_VERSION=%{version}
%cmake_build
%install
%cmake_install
rm -rf %{buildroot}%{_datadir}/qtcreator/templates/wizards/projects/qml-app-template/debian
%find_lang dtkdeclarative --with-qt
%fdupes %{buildroot}
%post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%files
%dir %{_libdir}/dtk%{dtkver}
%dir %{_libdir}/dtk%{dtkver}/DDeclarative
%{_libdir}/dtk%{dtkver}/DDeclarative/dtk-exhibition
# %{_datadir}/applications/dtk-exhibition.desktop
%dir %{_datadir}/qt6/doc
%{_datadir}/qt6/doc/dtkdeclarative.qch
%files -n lib%{name}%{sover}
%{_libdir}/lib%{name}.so.*
%files -n %{name}-qml-qt6
%dir %{_libdir}/qt6/qml/org
%{_libdir}/qt6/qml/org/deepin
%dir %{_libdir}/qt6/qml/Chameleon/
%{_libdir}/qt6/qml/Chameleon/*.qml
%{_libdir}/qt6/qml/Chameleon/qmldir
%{_libdir}/qt6/qml/Chameleon/qtquickcontrols*
%{_libdir}/qt6/qml/Chameleon/*.so
%files devel
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%dir %{_libdir}/cmake/Dtk%{dtkver}Declarative
%{_libdir}/cmake/Dtk%{dtkver}Declarative/*.cmake
%{_libdir}/qt6/mkspecs/modules/*.pri
%dir %{_includedir}/dtk%{dtkver}
%{_includedir}/dtk%{dtkver}/DDeclarative
%dir %{_datadir}/qtcreator
%dir %{_datadir}/qtcreator/templates
%dir %{_datadir}/qtcreator/templates/wizards
%dir %{_datadir}/qtcreator/templates/wizards/projects
%{_datadir}/qtcreator/templates/wizards/projects/*
%files lang -f dtkdeclarative.lang
%dir %{_datadir}/dtk%{dtkver}
%dir %{_datadir}/dtk%{dtkver}/DDeclarative
%dir %{_datadir}/dtk%{dtkver}/DDeclarative/translations
%{_datadir}/dtk%{dtkver}/DDeclarative/translations/dtkdeclarative.qm
%if 0%{?suse_version} <= 1500
%lang(ast) %{_datadir}/dtk%{dtkver}/DDeclarative/translations/dtkdeclarative_ast.qm
%endif
%changelog