diff --git a/CMakeLists.txt b/CMakeLists.txt index 51e9a02..db8406f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 2.8) project(qcustomplot) -include(GNUInstallDirs) set(LIB_VER "" CACHE STRING "Library version") set(QT_VER "6" CACHE STRING "Target Qt version") @@ -24,12 +23,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 ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} ) # Headers install(FILES qcustomplot.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + DESTINATION include ) diff --git a/qcustomplot.spec b/qcustomplot.spec index 87b1b81..bbdea16 100644 --- a/qcustomplot.spec +++ b/qcustomplot.spec @@ -4,15 +4,9 @@ %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: 14%{?dist} +Release: 4%{?dist} Summary: Qt widget for plotting and data visualization License: GPL-3.0-or-later @@ -24,9 +18,7 @@ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel -%if %{with qt6} BuildRequires: qt6-qtbase-devel -%endif %description @@ -40,6 +32,7 @@ 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. @@ -59,9 +52,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. @@ -74,12 +67,11 @@ This package contains the Qt6 version. %package qt6-devel Summary: Development files for %{name} (Qt6) -Requires: %{name}-qt6%{?_isa} = %{version}-%{release} +Requires: %{name}-qt5%{?_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 @@ -101,35 +93,23 @@ 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 -install -d %{buildroot}%{_libdir}/pkgconfig/ - -cat > %{buildroot}%{_libdir}/pkgconfig/%{name}-qt5.pc < %{buildroot}%{_libdir}/pkgconfig/%{name}-qt6.pc < %{buildroot}%{_libdir}/pkgconfig/%{name}$qtver.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 - -* Fri Jan 20 2023 Fedora Release Engineering - 2.1.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - * Tue Nov 29 2022 Sandro Mani - 2.1.1-4 - Set CMAKE_AUTOMOC to ON - Fix lib version take two