File Qt-Color-Widgets.spec of Package Qt-Color-Widgets
#
# spec file for package Qt-Color-Widgets
#
# Copyright (c) 2021 SUSE LLC
#
# 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 sover 2
%define qt_ver 5
%define cname QtColorWidgets
Name: Qt-Color-Widgets
Version: 2.2.0
Release: 0
Summary: Qt (C++) widgets to manage color inputs
License: LGPL-3.0-or-later
URL: https://gitlab.com/mattbas/Qt-Color-Widgets
Source0: https://gitlab.com/mattbas/Qt-Color-Widgets/-/archive/v%{version}/%{name}-v%{version}.tar.gz
# PATCH-FIX-OPENSUSE Qt-Color-Widgets_installation_paths.patch use versioned library path -- aloisio@gmx.com
Patch0: Qt-Color-Widgets_installation_paths.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: cmake(Qt5Widgets)
%description
Here is a color dialog that is more user-friendly than the default
QColorDialog and several other color-related widgets.
%package -n lib%{cname}-Qt%{qt_ver}%{sover}-%{sover}
Summary: Qt (C++) widgets to manage color inputs
%description -n lib%{cname}-Qt%{qt_ver}%{sover}-%{sover}
Here is a color dialog that is more user-friendly than the default
QColorDialog and several other color-related widgets.
%package devel
Summary: Development files for %{name}
Requires: lib%{cname}-Qt%{qt_ver}%{sover}-%{sover} = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n %{name}-v%{version}
%patch0 -p1
%build
%cmake
%cmake_build
%install
%cmake_install
%fdupes %{buildroot}%{_libdir}/cmake
%post -n lib%{cname}-Qt%{qt_ver}%{sover}-%{sover} -p /sbin/ldconfig
%postun -n lib%{cname}-Qt%{qt_ver}%{sover}-%{sover} -p /sbin/ldconfig
%files -n lib%{cname}-Qt%{qt_ver}%{sover}-%{sover}
%{_libdir}/lib%{cname}-Qt%{qt_ver}%{sover}.so.%{sover}*
%files devel
%license COPYING
%doc README.md
%{_includedir}/QtColorWidgets
%{_libdir}/lib%{cname}-Qt%{qt_ver}%{sover}.so
%{_libdir}/cmake/%{cname}-Qt%{qt_ver}%{sover}
%{_libdir}/pkgconfig/%{cname}-Qt%{qt_ver}%{sover}.pc
%changelog