File gio-qt.spec of Package gio-qt

#
# spec file for package gio-qt
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2020 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          0

Name:           gio-qt
Version:        0.0.14
Release:        0
Summary:        A Qt wrapper library for Gio
License:        LGPL-3.0-or-later
Group:          System/GUI/Other
URL:            https://github.com/linuxdeepin/gio-qt
Source0:        https://github.com/linuxdeepin/gio-qt/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  cmake >= 3.12.4
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  libqt5-qttools-qhelpgenerator
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt6Concurrent)
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6Test)
BuildRequires:  pkgconfig(giomm-2.4)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a Qt wrapper library for Gio (or say it's a glib/glibmm wrapper mainly
focused on GIO module). This library is designed to be exception-free and avoid
Qt application developer do direct access to glib/glibmm (so they can use Gio in
a more Qt way).

%package -n lib%{name}%{libver}
Summary:        A Qt5 wrapper library for Gio
Group:          System/Libraries

%description -n lib%{name}%{libver}
This is a Qt wrapper library for Gio (or say it's a glib/glibmm wrapper mainly
focused on GIO module). This library is designed to be exception-free and avoid
Qt application developer do direct access to glib/glibmm (so they can use Gio in
a more Qt way).

%package -n lib%{name}6-%{libver}
Summary:        A Qt6 wrapper library for Gio
Group:          System/Libraries

%description -n lib%{name}6-%{libver}
This is a Qt wrapper library for Gio (or say it's a glib/glibmm wrapper mainly
focused on GIO module). This library is designed to be exception-free and avoid
Qt application developer do direct access to glib/glibmm (so they can use Gio in
a more Qt way).

%package devel-header
Summary:        Development tools for gio-qt
Group:          Development/Languages/C and C++
Requires:       lib%{name}%{libver} = %{version}
BuildArch:      noarch

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

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

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

%package -n %{name}6-devel
Summary:        Development tools for gio-qt
Group:          Development/Languages/C and C++
Requires:       lib%{name}6-%{libver} = %{version}
Requires:       %{name}-devel-header = %{version}

%description -n %{name}6-devel
The gio-qt6-devel package contains the header files and developer
docs for gio-qt.

%prep
%autosetup -p1 -n %{name}-%{version}
sed -i 's/qhelpgenerator/qhelpgenerator-qt5/g' CMakeLists.txt

%build
%cmake
%cmake_build

%install
%cmake_install

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

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

%files -n lib%{name}%{libver}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so.*

%files -n lib%{name}6-%{libver}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}6.so.*

%files devel-header
%defattr(-,root,root,-)
%{_includedir}/%{name}

%files devel
%defattr(-,root,root,-)
%dir %{_datadir}/qt5/doc
%{_datadir}/qt5/doc/gio-qt.qch
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%files -n %{name}6-devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}6.so
%{_libdir}/pkgconfig/%{name}6.pc

%changelog
openSUSE Build Service is sponsored by