diff --git a/CMakeLists.txt b/CMakeLists.txt index db8406f..51e9a02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.5) project(qcustomplot) +include(GNUInstallDirs) set(LIB_VER "" CACHE STRING "Library version") set(QT_VER "6" CACHE STRING "Target Qt version") @@ -23,12 +24,12 @@ endif() target_link_libraries(qcustomplot Qt${QT_VER}::Core Qt${QT_VER}::Gui Qt${QT_VER}::Widgets Qt${QT_VER}::PrintSupport) install(TARGETS qcustomplot - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib${LIB_SUFFIX} - ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) # Headers install(FILES qcustomplot.h - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) diff --git a/qcustomplot.spec b/qcustomplot.spec index ce6ce42..87b1b81 100644 --- a/qcustomplot.spec +++ b/qcustomplot.spec @@ -4,9 +4,15 @@ %global lib_ver 2.0.0 #global pre beta +%if 0%{?rhel} +%bcond_with qt6 +%else +%bcond_without qt6 +%endif + Name: qcustomplot Version: 2.1.1 -Release: 6%{?dist} +Release: 14%{?dist} Summary: Qt widget for plotting and data visualization License: GPL-3.0-or-later @@ -18,7 +24,9 @@ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel +%if %{with qt6} BuildRequires: qt6-qtbase-devel +%endif %description @@ -32,7 +40,6 @@ This package contains the Qt4 version. %package qt5 Summary: Qt widget for plotting and data visualization -Requires: %{name}-qt5%{?_isa} = %{version}-%{release} %description qt5 QCustomPlot is a Qt C++ widget for plotting and data visualization. @@ -52,9 +59,9 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name} (Qt5). +%if %{with qt6} %package qt6 Summary: Qt widget for plotting and data visualization -Requires: %{name}-qt5%{?_isa} = %{version}-%{release} %description qt6 QCustomPlot is a Qt C++ widget for plotting and data visualization. @@ -67,11 +74,12 @@ This package contains the Qt6 version. %package qt6-devel Summary: Development files for %{name} (Qt6) -Requires: %{name}-qt5%{?_isa} = %{version}-%{release} +Requires: %{name}-qt6%{?_isa} = %{version}-%{release} %description qt6-devel The %{name}-devel package contains libraries and header files for developing applications that use %{name} (Qt6). +%endif %package doc @@ -93,23 +101,20 @@ cp -a %{SOURCE1} . %cmake -DQT_VER=5 -DLIB_VER=%{lib_ver} %cmake_build +%if %{with qt6} %define _vpath_builddir %{_target_platform}-qt6 %cmake -DQT_VER=6 -DLIB_VER=%{lib_ver} %cmake_build +%endif %install %define _vpath_builddir %{_target_platform}-qt5 %cmake_install -%define _vpath_builddir %{_target_platform}-qt6 -%cmake_install - -# pkg-config files -for qtver in -qt5 -qt6; do - install -d %{buildroot}%{_libdir}/pkgconfig/ -cat > %{buildroot}%{_libdir}/pkgconfig/%{name}$qtver.pc < %{buildroot}%{_libdir}/pkgconfig/%{name}-qt5.pc < %{buildroot}%{_libdir}/pkgconfig/%{name}-qt6.pc < - 2.1.1-14 +- Fix dependencies + +* Fri Jul 25 2025 Fedora Release Engineering - 2.1.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jul 17 2025 Sandro Mani - 2.1.1-12 +- Raise minimum CMake version, use GNUInstallDirs + +* Sat Jan 18 2025 Fedora Release Engineering - 2.1.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 19 2024 Fedora Release Engineering - 2.1.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 2.1.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Oct 05 2023 Sandro Mani - 2.1.1-7 +- Conditionalize qt6 build + * Fri Jul 21 2023 Fedora Release Engineering - 2.1.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild