File dtkdeclarative.spec of Package dtkdeclarative
#
# spec file for package dtkdeclarative
#
# Copyright (c) 2023 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2023 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 5
%define dtkver 5.6.9
Name: dtkdeclarative
Version: 5.7.1
Release: 0
License: LGPL-3.0-or-later
Summary: Deepin widget development toolkit based on QtQuick/QtQml
Url: https://github.com/linuxdeepin/dtkdeclarative
Group: System/GUI/Other
Source: https://github.com/linuxdeepin/dtkdeclarative/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: libqt5-qttools-qhelpgenerator
BuildRequires: libqt5-qtquickcontrols2-private-headers-devel
BuildRequires: libqt5-qtdeclarative-private-headers-devel
BuildRequires: libqt5-linguist
BuildRequires: gtest
BuildRequires: doxygen
BuildRequires: dtkcommon
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(dtkwidget)
BuildRequires: pkgconfig(dtkcore)
BuildRequires: pkgconfig(dtkgui) >= 5.5.23
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(spdlog)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Help)
# 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-qt5
Summary: Qt 5 dtkdeclarative QML files and plugins
Requires: lib%{name}%{sover} = %{version}-%{release}
%description -n %{name}-qml-qt5
QML files and plugins from the Qt 5 dtkdeclarative 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
%autosetup -p1 -n %{name}-%{version}
%build
%cmake -DINCLUDE_INSTALL_DIR=%{_includedir}/dtk5/DDeclarative
%cmake_build
%install
%cmake_install
rm -rf %{buildroot}%{_datadir}/qtcreator/templates/wizards/projects/qml-app-template/debian
%find_lang %{name} --with-qt
%post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%files
%{_bindir}/dtk-exhibition
%dir %{_libdir}/qt5/qml/org
%{_libdir}/qt5/qml/org/deepin
%dir %{_datadir}/qt5/doc
%{_datadir}/qt5/doc/dtkdeclarative.qch
%files -n lib%{name}%{sover}
%{_libdir}/libdtkdeclarative.so.*
%files -n %{name}-qml-qt5
%dir %{_libdir}/qt5/qml/QtQuick/
%dir %{_libdir}/qt5/qml/QtQuick/Controls.2
%{_libdir}/qt5/qml/QtQuick/Controls.2/Chameleon
%files devel
%{_libdir}/libdtkdeclarative.so
%{_libdir}/pkgconfig/dtkdeclarative.pc
%dir %{_libdir}/cmake/DtkDeclarative
%{_libdir}/cmake/DtkDeclarative/*.cmake
%{_libdir}/qt5/mkspecs/modules/qt_lib_dtkdeclarative.pri
%dir %{_includedir}/dtk5
%{_includedir}/dtk5/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 %{name}.lang
%dir %{_datadir}/dtk5
%dir %{_datadir}/dtk5/DDeclarative
%dir %{_datadir}/dtk5/DDeclarative/translations
%{_datadir}/dtk5/DDeclarative/translations/dtkdeclarative.qm
%if 0%{?suse_version} <= 1500
%lang(ast) %{_datadir}/dtk5/DDeclarative/translations/dtkdeclarative_ast.qm
%endif
%changelog