%define commit0 11730d44910a51953a0a64237667617c5c623361 %define libname_major 1 %define libname_core_major 1 ### Qt5 libraries %define libname_qt5 %mklibname %name-qt5_ %libname_major %define libname_core_qt5 %mklibname qtsinglecoreapplication-qt5_ %libname_core_major %define libname_devel_qt5 %mklibname %name-qt5 -d %define libname_core_devel_qt5 %mklibname qtsinglecoreapplication-qt5 -d ### Qt6 libraries %define libname_qt6 %mklibname %name-qt6_ %libname_major %define libname_core_qt6 %mklibname qtsinglecoreapplication-qt6_ %libname_core_major %define libname_devel_qt6 %mklibname %name-qt6 -d %define libname_core_devel_qt6 %mklibname qtsinglecoreapplication-qt6 -d Summary: Qt library to start applications only once per user Name: qtsingleapplication Version: 2.6.1 Release: %mkrel 25 Group: Development/KDE and Qt License: GPLv3 or LGPLv2 with exceptions URL: https://docs.huihoo.com/qt/solutions/4/qtsingleapplication/qtsingleapplication.html Source0: https://github.com/qtproject/qt-solutions/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz # Proposed upstream in https://codereview.qt-project.org/#/c/92417/ Source1: qtsingleapplication.prf # Proposed upstream in https://codereview.qt-project.org/#/c/92416/ Source2: qtsinglecoreapplication.prf # Proposed upstream in https://codereview.qt-project.org/#/c/92411/ Source3: LGPL_EXCEPTION # Proposed upstream in https://codereview.qt-project.org/#/c/92416/ Patch0: qtsingleapplication-2.6.1-fda-build-qtsinglecoreapplication.patch # Proposed upstream in https://codereview.qt-project.org/#/c/92415/ Patch1: qtsingleapplication-2.6.1-fda-remove-included-qtlockedfile.patch # Features for unbundling in Qupzilla, https://github.com/QupZilla/qupzilla/issues/1503 Patch2: qtsingleapplication-2.6.1-fda-qupzilla.patch Patch10: 0001-Fix-build-with-Qt6.patch ### Qt5 Buildrequirement BuildRequires: qtbase5-common-devel BuildRequires: qt5lockedfile-devel BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Widgets) ### Qt5 Buildrequirement BuildRequires: qtbase6-common-devel BuildRequires: qt6lockedfile-devel BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6Network) BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: cmake(Qt6Core5Compat) %description For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance. The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. # ---------------------------- ### Qt5 ### %package -n %libname_qt5 Summary: Qt5 library to start applications only once per user Group: Development/KDE and Qt Requires: qtbase5-common # drop Qt4 support for mga10 Obsoletes: %{_lib}qtsingleapplication1 < 2.6.1-25 %description -n %libname_qt5 For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance. The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. This is the library package for QtSingleApplication. This is a special build against Qt5. %files -n %libname_qt5 %doc README.TXT licenses/LGPL_EXCEPTION # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/lib*Qt5Solutions_SingleApplication*.so.%{libname_major}{,.*} # ---------------------------- %package -n %libname_devel_qt5 Summary: Development files for %{name}-qt5 Group: Development/KDE and Qt Requires: %{libname_qt5} = %{version}-%{release} Provides: qtsingleapplication-qt5-devel = %{version}-%{release} # drop Qt4 support for mga10 Obsoletes: %{_lib}qtsingleapplication-devel < 2.6.1-25 %description -n %libname_devel_qt5 This package contains libraries and header files for developing applications that use QtSingleApplication with Qt5. %files -n %libname_devel_qt5 %doc doc/html/ examples/ %{_qt5_libdir}/lib*Qt5Solutions_SingleApplication*.so %dir %{_qt5_includedir}/QtSolutions/ %{_qt5_includedir}/QtSolutions/QtSingleApplication %{_qt5_includedir}/QtSolutions/%{name}.h %{_qt5_libdir}/qt5/mkspecs/features/qtsingleapplication.prf # ---------------------------- %package -n %libname_core_qt5 Summary: Qt5 library to start applications only once per user Group: Development/KDE and Qt # drop Qt4 support for mga10 Obsoletes: %{_lib}qtsinglecoreapplication1 < 2.6.1-25 %description -n %libname_core_qt5 For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui. This is a special build against Qt5. %files -n %libname_core_qt5 # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/lib*Qt5Solutions_SingleCoreApplication*.so.%{libname_core_major}{,.*} # ---------------------------- %package -n %libname_core_devel_qt5 Summary: Development files for qtsinglecoreapplication-qt5 Group: Development/KDE and Qt Requires: %libname_core_qt5 = %{version}-%{release} Provides: qtsinglecoreapplication-qt5-devel = %{version}-%{release} # drop Qt4 support for mga10 Obsoletes: %{_lib}qtsinglecoreapplication-devel < 2.6.1-25 %description -n %libname_core_devel_qt5 This package contains libraries and header files for developing applications that use QtSingleCoreApplication with Qt5. %files -n %libname_core_devel_qt5 %{_qt5_libdir}/lib*Qt5Solutions_SingleCoreApplication*.so %dir %{_qt5_includedir}/QtSolutions/ %{_qt5_includedir}/QtSolutions/QtSingleCoreApplication %{_qt5_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt5_libdir}/qt5/mkspecs/features/qtsinglecoreapplication.prf ### End Qt5 ### # ---------------------------- ### Qt6 ### %package -n %libname_qt6 Summary: Qt6 library to start applications only once per user Group: Development/KDE and Qt Requires: qtbase6-common %description -n %libname_qt6 For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance. The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. This is the library package for QtSingleApplication. This is a special build against Qt6. %files -n %libname_qt6 %doc README.TXT licenses/LGPL_EXCEPTION # Caution! Unversioned .so file goes into -devel %{_qt6_libdir}/lib*Qt6Solutions_SingleApplication*.so.%{libname_major}{,.*} # ---------------------------- %package -n %libname_devel_qt6 Summary: Development files for %{name}-qt6 Group: Development/KDE and Qt Requires: %{libname_qt6} = %{version}-%{release} Provides: qtsingleapplication-qt6-devel = %{version}-%{release} %description -n %libname_devel_qt6 This package contains libraries and header files for developing applications that use QtSingleApplication with Qt6. %files -n %libname_devel_qt6 %doc doc/html/ examples/ %{_qt6_libdir}/lib*Qt6Solutions_SingleApplication*.so %dir %{_qt6_includedir}/QtSolutions/ %{_qt6_includedir}/QtSolutions/QtSingleApplication %{_qt6_includedir}/QtSolutions/%{name}.h %{_qt6_libdir}/qt6/mkspecs/features/qtsingleapplication.prf # ---------------------------- %package -n %libname_core_qt6 Summary: Qt6 library to start applications only once per user Group: Development/KDE and Qt %description -n %libname_core_qt6 For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui. This is a special build against Qt6. %files -n %libname_core_qt6 # Caution! Unversioned .so file goes into -devel %{_qt6_libdir}/lib*Qt6Solutions_SingleCoreApplication*.so.%{libname_core_major}{,.*} # ---------------------------- %package -n %libname_core_devel_qt6 Summary: Development files for qtsinglecoreapplication-qt6 Group: Development/KDE and Qt Requires: %libname_core_qt6 = %{version}-%{release} Provides: qtsinglecoreapplication-qt6-devel = %{version}-%{release} %description -n %libname_core_devel_qt6 This package contains libraries and header files for developing applications that use QtSingleCoreApplication with Qt6. %files -n %libname_core_devel_qt6 %{_qt6_libdir}/lib*Qt6Solutions_SingleCoreApplication*.so %dir %{_qt6_includedir}/QtSolutions/ %{_qt6_includedir}/QtSolutions/QtSingleCoreApplication %{_qt6_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt6_libdir}/qt6/mkspecs/features/qtsinglecoreapplication.prf ### End Qt6 ### # ---------------------------- %prep %setup -qnqt-solutions-%{commit0}/%{name} %patch0 -p0 %patch1 -p0 %patch2 -p1 %patch10 -p2 # use versioned soname sed -i "s,head,%(echo '%{version}' |sed -r 's,(.*)\..*,\1,'),g" common.pri mkdir licenses cp -p %{SOURCE3} licenses # We already disabled bundling this external library. # But just to make sure: rm -rf ../qtlockedfile/ sed -i 's,qtlockedfile\.h,QtSolutions/\0,' src/qtlocalpeer.h rm src/{QtLocked,qtlocked}* mkdir qt5 cp -p %{SOURCE1} %{SOURCE2} qt5 sed -i -r 's,-lQt,\05,' qt5/qtsingleapplication.prf sed -i -r 's,-lQt,\05,' qt5/qtsinglecoreapplication.prf mkdir qt6 cp -p %{SOURCE1} %{SOURCE2} qt6 sed -i -r 's,-lQt,\06,' qt6/qtsingleapplication.prf sed -i -r 's,-lQt,\06,' qt6/qtsinglecoreapplication.prf # additional header needed for Qt5.5 sed -i -r 's,.include,\0 \n\0,' src/qtlocalpeer.h %build # Does not use GNU configure ./configure -library ### Qt5 build ### pushd qt5 %qmake_qt5 .. %make_build popd ### Qt5 build ### pushd qt6 %qmake_qt6 .. %make_build %install # libraries mkdir -p %{buildroot}%{_libdir} cp -a lib/* %{buildroot}%{_libdir} chmod 755 %{buildroot}%{_libdir}/*.so* # headers mkdir -p %{buildroot}%{_qt5_includedir}/QtSolutions cp -ap \ src/qtsingleapplication.h \ src/QtSingleApplication \ src/qtsinglecoreapplication.h \ src/QtSingleCoreApplication \ %{buildroot}%{_qt5_includedir}/QtSolutions mkdir -p %{buildroot}%{_qt6_includedir} # symlink is not possible due to split into individual subpackages cp -ap %{buildroot}%{_qt5_includedir}/QtSolutions %{buildroot}%{_qt6_includedir} mkdir -p %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features %{buildroot}%{_qt6_libdir}/qt6/mkspecs/features install -p -m644 qt5/*.prf %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features install -p -m644 qt6/*.prf %{buildroot}%{_qt6_libdir}/qt6/mkspecs/features %changelog * Tue Sep 05 2023 daviddavid 2.6.1-25.mga10 + Revision: 1984549 - time to remove Qt4 support and add now Qt6 support * Tue Apr 05 2022 kekepower 2.6.1-24.mga9 + Revision: 1844903 - Update to git commit 11730d44910a51953a0a64237667617c5c623361, 2022-01-10 * Mon Apr 04 2022 umeabot 2.6.1-23.mga9 + Revision: 1843334 - Mageia 9 Mass Rebuild * Thu Dec 17 2020 umeabot 2.6.1-22.mga8 + Revision: 1659640 - Rebuild for new Qt5 * Sat Feb 15 2020 umeabot 2.6.1-21.mga8 + Revision: 1527907 - Mageia 8 Mass Rebuild + daviddavid - update URL * Fri Jul 26 2019 daviddavid 2.6.1-20.mga8 + Revision: 1424451 - rebuild for new Qt5 headers path * Mon Apr 01 2019 umeabot 2.6.1-19.mga7 + Revision: 1384527 - Qt5 Rebuild * Sun Sep 23 2018 umeabot 2.6.1-18.mga7 + Revision: 1300727 - Mageia 7 Mass Rebuild * Thu Apr 19 2018 kekepower 2.6.1-17.mga7 + Revision: 1220082 - Update to git commit ee17851b42f21bb92c4b7581e80c0319e5384e6b, 2017-10-23 * Sun Apr 24 2016 daviddavid 2.6.1-16.mga6 + Revision: 1005847 - add patch from fedora to add features for Qupzilla * https://github.com/QupZilla/qupzilla/issues/1503 * Fri Jan 08 2016 daviddavid 2.6.1-15.mga6 + Revision: 920630 - do not install Qt5 libraries into libqtsingleapplication1 Qt4 subpackage * Thu Jan 07 2016 daviddavid 2.6.1-14.mga6 + Revision: 920372 - rename libqtsingleapplication-qt51 to libqtsingleapplication-qt5_1 - rename libqtsinglecoreapplication-qt51 to libqtsinglecoreapplication-qt5_1 * Thu Jan 07 2016 daviddavid 2.6.1-13.mga6 + Revision: 920307 - fix Requires, Provides and BuildRequires list - update some descriptions - use a better libification for Qt5 subpackages * Thu Jan 07 2016 dglent 2.6.1-12.mga6 + Revision: 920165 + rebuild (emptylog) * Wed Jan 06 2016 dglent 2.6.1-11.mga6 + Revision: 920160 - Add qt5 support mga#16523 * Mon Dec 28 2015 pterjan 2.6.1-10.mga6 + Revision: 916618 - Fix buildRequires * Wed Oct 15 2014 umeabot 2.6.1-9.mga5 + Revision: 746341 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot 2.6.1-8.mga5 + Revision: 688559 - Mageia 5 Mass Rebuild * Fri Oct 18 2013 umeabot 2.6.1-7.mga4 + Revision: 521228 - Mageia 4 Mass Rebuild * Sat Jan 19 2013 fwang 2.6.1-6.mga3 + Revision: 389701 - add fedora patch to fix build + umeabot - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jan 25 2012 mikala 2.6.1-5.mga2 + Revision: 200683 - Rebuild for Qt4.8 * Tue Jan 17 2012 mikala 2.6.1-4.mga2 + Revision: 197455 - Add %%version-%%release in virtual provides (Florian Hubold) * Tue Jan 17 2012 mikala 2.6.1-3.mga2 + Revision: 197376 - Switch to new qt4 macros & ensure that devel files are correctly located ( spotted by Florian Hubold) + dmorgan - Use new qt4 macros - Rebuild against new qt4 and new include path * Mon Jun 20 2011 ahmad 2.6.1-1.mga2 + Revision: 110224 - Adapt the spec to the Mageia packaging policies - imported package qtsingleapplication * Tue Feb 08 2011 Fedora Release Engineering - 2.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Aug 11 2010 Orcan Ogetbil 2.6.1-4 - Make the additional API patch backwards compatible * Wed Jul 21 2010 Orcan Ogetbil 2.6.1-3 - Split the qtsinglecoreapplication bits into their own subpackages * Fri Jul 16 2010 Orcan Ogetbil 2.6.1-2 - Add additional API to support clementine. * Sun Jun 04 2010 Orcan Ogetbil 2.6.1-1 - Change version to 2.6.1. Upstream uses weird version convention 2.6_1 - Own the directory %%{_qt4_headerdir}/QtSolutions/ * Sat May 01 2010 Orcan Ogetbil 2.6-3 - Add comments to the extra source and patches - Add a chmod 755 to make sure that the library gets the right permission * Thu Apr 15 2010 Orcan Ogetbil 2.6-2 - Include .prf file - Don't bundle external qtlockedfile library - Fix typo in the description * Sun Apr 11 2010 Orcan Ogetbil 2.6-1 - Initial Fedora package. Specfile partly borrowed from opensuse * Thu Dec 3 2009 Todor Prokopov - Initial package.