diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 51e9a02..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -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") - -set(QCUSTOMPLOT_LIB_VERSION ${LIB_VER}) -string(REPLACE "." ";" VERSION_LIST ${LIB_VER}) -list(GET VERSION_LIST 0 QCUSTOMPLOT_SO_VERSION) - -FIND_PACKAGE(Qt${QT_VER}Core REQUIRED) -FIND_PACKAGE(Qt${QT_VER}Gui REQUIRED) -FIND_PACKAGE(Qt${QT_VER}Widgets REQUIRED) -FIND_PACKAGE(Qt${QT_VER}PrintSupport REQUIRED) -SET(CMAKE_AUTOMOC ON) - -# Library -add_library(qcustomplot SHARED qcustomplot.cpp qcustomplot.h) -set_target_properties(qcustomplot PROPERTIES VERSION ${QCUSTOMPLOT_LIB_VERSION} SOVERSION ${QCUSTOMPLOT_SO_VERSION}) -if (${QT_VER} GREATER "4") -set_target_properties(qcustomplot PROPERTIES OUTPUT_NAME qcustomplot-qt${QT_VER}) -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} -) - -# Headers -install(FILES qcustomplot.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) diff --git a/qcustomplot.pro b/qcustomplot.pro new file mode 100644 index 0000000..e0c1054 --- /dev/null +++ b/qcustomplot.pro @@ -0,0 +1,14 @@ +TEMPLATE = lib +VERSION = $$SOVERSION +TARGET = qcustomplot$$QTSUFFIX +QT = core gui widgets printsupport + +SOURCES = qcustomplot.cpp +HEADERS = qcustomplot.h + +target.path = $$LIBDIR +INSTALLS += target + +header.path = /usr/include +header.files = qcustomplot.h +INSTALLS += header \ No newline at end of file diff --git a/qcustomplot.spec b/qcustomplot.spec index 87b1b81..bd131b2 100644 --- a/qcustomplot.spec +++ b/qcustomplot.spec @@ -1,32 +1,20 @@ # Bump this as appropriate when doing release updates, check i.e. with abi_compliance_checker # First digit: major, bump when incompatible changes were performed # Second digit: minor, bump when interface was extended -%global lib_ver 2.0.0 -#global pre beta - -%if 0%{?rhel} -%bcond_with qt6 -%else -%bcond_without qt6 -%endif +%global so_ver 1.0.0 Name: qcustomplot -Version: 2.1.1 -Release: 14%{?dist} +Version: 1.3.2 +Release: 1%{?dist} Summary: Qt widget for plotting and data visualization -License: GPL-3.0-or-later +License: GPLv3+ URL: http://www.qcustomplot.com/ -Source0: http://www.qcustomplot.com/release/%{version}%{?pre:-%pre}/QCustomPlot.tar.gz -Source1: CMakeLists.txt +Source0: http://www.qcustomplot.com/release/%{version}/QCustomPlot.tar.gz +Source1: %{name}.pro -BuildRequires: cmake -BuildRequires: ninja-build -BuildRequires: gcc-c++ +BuildRequires: qt4-devel BuildRequires: qt5-qtbase-devel -%if %{with qt6} -BuildRequires: qt6-qtbase-devel -%endif %description @@ -38,8 +26,18 @@ visualization applications. This package contains the Qt4 version. +%package devel +Summary: Development files for %{name} (Qt4) +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name} (Qt4). + + %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. @@ -56,30 +54,7 @@ Requires: %{name}-qt5%{?_isa} = %{version}-%{release} %description qt5-devel 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 - -%description qt6 -QCustomPlot is a Qt C++ widget for plotting and data visualization. -This plotting library focuses on making good looking, publication quality 2D -plots, graphs and charts, as well as offering high performance for realtime -visualization applications. - -This package contains the Qt6 version. - - -%package qt6-devel -Summary: Development files for %{name} (Qt6) -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 +developing applications that use %{name} (Qt5). %package doc @@ -92,58 +67,77 @@ The %{name}-doc package contains the documentation and examples for %prep -%autosetup -p1 -n %{name} +%setup -q -n %{name} cp -a %{SOURCE1} . %build -%define _vpath_builddir %{_target_platform}-qt5 -%cmake -DQT_VER=5 -DLIB_VER=%{lib_ver} -%cmake_build +mkdir qt4 +( +cd qt4 +LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %qmake_qt4 SOVERSION=%{so_ver} LIBDIR=%{_libdir} .. +make %{?_smp_mflags} +) -%if %{with qt6} -%define _vpath_builddir %{_target_platform}-qt6 -%cmake -DQT_VER=6 -DLIB_VER=%{lib_ver} -%cmake_build -%endif +mkdir qt5 +( +cd qt5 +LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %qmake_qt5 SOVERSION=%{so_ver} QTSUFFIX=-qt5 LIBDIR=%{_libdir} .. +make %{?_smp_mflags} +) %install -%define _vpath_builddir %{_target_platform}-qt5 -%cmake_install +make -C qt4 INSTALL_ROOT=%{buildroot} install +make -C qt5 INSTALL_ROOT=%{buildroot} install +# pkg-config file install -d %{buildroot}%{_libdir}/pkgconfig/ - -cat > %{buildroot}%{_libdir}/pkgconfig/%{name}-qt5.pc < %{buildroot}%{_libdir}/pkgconfig/%{name}.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 - -* 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 - -* Mon Nov 28 2022 Sandro Mani - 2.1.1-3 -- Fix lib version - -* Mon Nov 28 2022 Sandro Mani - 2.1.1-2 -- Add Qt6 build, drop Qt4 build - -* Wed Nov 09 2022 Sandro Mani - 2.1.1-1 -- Update to 2.1.1 - -* Fri Jul 22 2022 Fedora Release Engineering - 2.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jan 21 2022 Fedora Release Engineering - 2.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 2.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Mar 29 2021 Sandro Mani - 2.1.0-1 -- Update to 2.1.0 - -* Wed Jan 27 2021 Fedora Release Engineering - 2.0.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 2.0.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jan 30 2020 Fedora Release Engineering - 2.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jul 26 2019 Fedora Release Engineering - 2.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 2.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 2.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 25 2018 Sandro Mani - 2.0.1-1 -- Update to 2.0.1 - -* Mon Feb 19 2018 Sandro Mani - 2.0.0-1 -- Update to 2.0.0 -- Add missing BR: gcc-c++, make - -* Fri Feb 09 2018 Fedora Release Engineering - 2.0.0-0.2.beta -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Aug 20 2017 Sandro Mani - 2.0.0-0.1.beta -- Update to 2.0.0-beta - -* Thu Aug 03 2017 Fedora Release Engineering - 1.3.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.3.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 1.3.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 1.3.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Feb 04 2016 Fedora Release Engineering - 1.3.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - * Tue Dec 22 2015 Sandro Mani - 1.3.2-1 - Update to 1.3.2 diff --git a/sources b/sources index 25b6ede..9af75f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (QCustomPlot.tar.gz) = 2e49a9b3f7ab03bcd580e5f3c3ae0d5e8c57d3ccce0ceed9862cde7ea23e2f3672a963af988be60e504cb5aa50bc462e4b28acf577eae41cc6fea2802642dc19 +a86d447230f7a3966cfbd946f7a3d301 QCustomPlot.tar.gz