File gsettings-qt6.spec of Package gsettings-qt

#
# spec file for package gsettings-qt
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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 libver 1
%define repo gsettings-qt

Name:           gsettings-qt6
Version:        1.1.0
Release:        0
Summary:        QT bindings for GSettings
License:        GPL-3.0+
Group:          Development/Libraries/X11
Url:            https://gitlab.com/ubports/development/core/gsettings-qt
Source0:        https://gitlab.com/ubports/development/core/gsettings-qt/-/archive/v%{version}/gsettings-qt-v%{version}.tar.bz2
Patch0:         fix-filename-and-path-of-qmlplugindump.patch
BuildRequires:  pkg-config
BuildRequires:  cmake(QmlPlugins)
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6Gui)
BuildRequires:  pkgconfig(Qt6Network)
BuildRequires:  pkgconfig(Qt6OpenGL)
BuildRequires:  pkgconfig(Qt6Qml)
BuildRequires:  pkgconfig(Qt6Quick)
BuildRequires:  pkgconfig(Qt6QuickTest)
BuildRequires:  pkgconfig(Qt6Sql)
BuildRequires:  pkgconfig(Qt6Test)
BuildRequires:  pkgconfig(Qt6Widgets)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Qt/QML bindings for GSettings.

%package -n libgsettings-qt6-%{libver}
Summary:        Libraries for gsettings-qt
Group:          System/Libraries

%description -n libgsettings-qt6-%{libver}
Qt/QML bindings for GSettings.

This package is Libraries for gsettings-qt.

%package devel
Summary:        Libraries for gsettings-qt6
Group:          Development/Libraries/X11
Requires:       libgsettings-qt6-%{libver} = %{version}

%description devel
Qt/QML bindings for GSettings.

This package contains the header files and developer
docs for gsettings-qt.

%prep
%autosetup -p1 -n %{repo}-v%{version}

%build
%cmake -DENABLE_QT6=ON
%cmake_build

%install
%cmake_install

%post -n libgsettings-qt6-%{libver} -p /sbin/ldconfig
%postun -n libgsettings-qt6-%{libver} -p /sbin/ldconfig

%files
%license COPYING
%dir %{_libdir}/qt6/qml/GSettings
%{_libdir}/qt6/qml/GSettings/libGSettingsQmlPlugin.so
%{_libdir}/qt6/qml/GSettings/plugins.qmltypes
%{_libdir}/qt6/qml/GSettings/qmldir

%files -n libgsettings-qt6-%{libver}
%{_libdir}/libgsettings-qt6.so.*

%files devel
%{_libdir}/pkgconfig/gsettings-qt6.pc
%dir %{_includedir}/qt6/QGSettings
%{_includedir}/qt6/QGSettings/QGSettings
%{_includedir}/qt6/QGSettings/qgsettings.h
%{_libdir}/libgsettings-qt6.so

%changelog
openSUSE Build Service is sponsored by