## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without qt5 %bcond_without qt6 # currently broken %bcond_with docs %bcond_without test %global forgeurl https://github.com/KDAB/KDSingleApplication/ # bumping this requires rebuild of dependent pkgs! %global soversion 1.0 %define cmake_args -DKDSingleApplication_TESTS=true %if %{with docs} %define cmake_args %cmake_args -DKDSingleApplication_DOCS=true %endif Name: kdsingleapplication Version: 1.0.0 Release: %autorelease Summary: KDAB's helper class for single-instance policy applications %forgemeta URL: %{forgeurl} Source: %{forgesource} License: MIT Patch0: %{forgeurl}/commit/c49b0514738e0c1fef8ec60a706e4a1ee1284604.patch#/000-cmake-lint-fix.patch Patch1: %{forgeurl}/commit/250ab66f58aa37193f2e8b7814946e7a43d25cc7.patch#/001-fix-versioning.patch BuildRequires: cmake BuildRequires: gcc-c++ %if %{with qt5} BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Network) BuildRequires: cmake(Qt5Widgets) %endif %if %{with qt6} BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Network) BuildRequires: cmake(Qt6Widgets) %endif %if %{with docs} BuildRequires: doxygen %endif %global _description %{expand: KDSingleApplication is a helper class for single-instance policy applications written by KDAB.} %description %_description %prep %forgeautosetup -p1 %build %if %{with qt5} %global _vpath_builddir build-qt5 %cmake %cmake_args %cmake_build %endif %if %{with qt6} %global _vpath_builddir build-qt6 %cmake %cmake_args -DKDSingleApplication_QT6=true %cmake_build %endif %install %if %{with qt5} %global _vpath_builddir build-qt5 %cmake_install %endif %if %{with qt6} %global _vpath_builddir build-qt6 %cmake_install %endif %if %{with test} %check %if %{with qt5} %global _vpath_builddir build-qt5 %ctest %endif %if %{with qt6} %global _vpath_builddir build-qt6 %ctest %endif %endif %if %{with qt5} %package qt5 Summary: KDAB's helper class for single-instance policy applications (Qt5) %description qt5 %_description %files qt5 %license LICENSES/MIT.txt %{_libdir}/libkdsingleapplication.so.%{soversion}* %{_docdir}/KDSingleApplication %package qt5-devel Summary: Development files for %{name}-qt5 Requires: %{name}-qt5%{?_isa} = %{version}-%{release} Requires: cmake(Qt5Core) Requires: cmake(Qt5Network) Requires: cmake(Qt5Widgets) %description qt5-devel The %{name}-qt5-devel package contains libraries, header files and documentation for developing applications that use %{name}-qt5. %files qt5-devel %license LICENSES/MIT.txt %{_libdir}/libkdsingleapplication.so %{_libdir}/cmake/KDSingleApplication/ %{_libdir}/qt5/mkspecs/modules/* %{_includedir}/kdsingleapplication/ %endif %if %{with qt6} %package qt6 Summary: KDAB's helper class for single-instance policy applications (Qt6) %description qt6 %_description %files qt6 %license LICENSES/MIT.txt %{_libdir}/libkdsingleapplication-qt6.so.%{soversion}* %{_docdir}/KDSingleApplication-qt6 %package qt6-devel Summary: Development files for %{name}-qt6 Requires: %{name}-qt6%{?_isa} = %{version}-%{release} Requires: cmake(Qt6Core) Requires: cmake(Qt6Network) Requires: cmake(Qt6Widgets) %description qt6-devel The %{name}-qt6-devel package contains libraries, header files and documentation for developing applications that use %{name}-qt6. %files qt6-devel %license LICENSES/MIT.txt %{_libdir}/libkdsingleapplication-qt6.so %{_libdir}/cmake/KDSingleApplication-qt6/ %{_libdir}/qt6/mkspecs/modules/* %{_includedir}/kdsingleapplication-qt6/ %endif %changelog * Fri Nov 17 2023 John Doe - 1.0.0-1 - Uncommitted changes