Mageia Bugzilla – Attachment 6891 Details for
Bug 16523
Add qt5 support for qtsingleapplication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Spec file draft
qtsingleapplication.spec (text/x-rpm-spec), 9.11 KB, created by
Dimitrios Glentadakis
on 2015-08-03 17:34:30 CEST
(
hide
)
Description:
Spec file draft
Filename:
MIME Type:
Creator:
Dimitrios Glentadakis
Created:
2015-08-03 17:34:30 CEST
Size:
9.11 KB
patch
obsolete
># Upstream uses weird versioning convention >%define upstreamver 2.6_1 > >%define libname_major 1 >%define libname_core_major 1 >%define libname %mklibname %name %libname_major >%define libname_core %mklibname qtsinglecoreapplication %libname_core_major >%define libname_devel %mklibname %name -d >%define libname_core_devel %mklibname qtsinglecoreapplication -d > >Summary: Qt library to start applications only once per user >Name: qtsingleapplication >Version: %(echo %upstreamver | sed 's!_!.!' ) >Release: %mkrel 9 >Group: Development/KDE and Qt >License: GPLv3 or LGPLv2 with exceptions >URL: http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication >Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtsingleapplication-%{upstreamver}-opensource.tar.gz ># (Fedora) The following source and 2 patches are sent upstream: ># http://bugreports.qt.nokia.com/browse/QTSOLBUG-119 ># To add qmake support for convenience for packages using this library: >Source1: qtsingleapplication.prf >Source2: qtsinglecoreapplication.prf ># Don't build examples, Include qtsinglecoreapplication library in the build: >Patch0: qtsingleapplication-build.diff ># (Fedora) The library includes a duplicate of qtlockedfile. We link to it dynamically instead: >Patch1: qtsingleapplication-dont-bundle-external-libs.patch ># (Fedora) Additional API for building clementine ># http://bugreports.qt.nokia.com/browse/QTSOLBUG-133 >Patch2: qtsingleapplication-add-api.patch >Patch3: qtsingleapplication-gcc47.patch >BuildRequires: qt4-devel >BuildRequires: qtlockedfile-devel > >%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. > >#-------------------------------------------------------------------- > >%package -n %libname >Summary: Qt library to start applications only once per user >Group: Development/KDE and Qt > >%description -n %libname >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. > >%files -n %libname >%{_qt4_libdir}/lib*SingleApplication*.so.%{libname_major}* > >#-------------------------------------------------------------------- > >%package -n %libname_devel >Summary: Development files for %{name} >Group: Development/KDE and Qt >Requires: %{libname} = %{version}-%{release} >Provides: qtsingleapplication-devel = %{version}-%{release} > >%description -n %libname_devel >This package contains libraries and header files for developing applications >that use QtSingleApplication. > >%files -n %libname_devel >%doc LGPL_EXCEPTION.txt LICENSE.* README.TXT >%doc doc examples >%{_qt4_libdir}/lib*SingleApplication*.so >%dir %{_qt4_includedir}/QtSolutions/ >%{_qt4_includedir}/QtSolutions/QtSingleApplication >%{_qt4_includedir}/QtSolutions/%{name}.h >%{_qt4_datadir}/mkspecs/features/%{name}.prf > >#-------------------------------------------------------------------- > >%package -n %libname_core >Summary: Qt library to start applications only once per user >Group: Development/KDE and Qt > >%description -n %libname_core >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 the library package for QtSingleCoreApplication. > >%files -n %libname_core >%{_qt4_libdir}/lib*SingleCoreApplication*.so.%{libname_core_major}* > >#-------------------------------------------------------------------- > >%package -n %libname_core_devel >Summary: Development files for qtsinglecoreapplication >Group: Development/KDE and Qt >Requires: %libname_core = %{version}-%{release} >Provides: qtsinglecoreapplication-devel = %{version}-%{release} > >%description -n %libname_core_devel >This package contains libraries and header files for developing applications >that use QtSingleCoreApplication. > >%files -n %libname_core_devel >%doc LGPL_EXCEPTION.txt LICENSE.* >%{_qt4_libdir}/lib*SingleCoreApplication*.so >%dir %{_qt4_includedir}/QtSolutions/ >%{_qt4_includedir}/QtSolutions/QtSingleCoreApplication >%{_qt4_includedir}/QtSolutions/qtsinglecoreapplication.h >%{_qt4_datadir}/mkspecs/features/qtsinglecoreapplication.prf > >%package qt5 >Summary: Qt5 library to start applications only once per user >BuildRequires: qt5lockedfile-devel >Requires: qtbase5-common > >%description 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. > >This is a special build against Qt5. > >%files qt5 >%license licenses/* >%doc README.TXT ># Caution! Unversioned .so file goes into -devel >%{_qt5_libdir}/libQt5*SingleApplication*.so.* > >%package qt5-devel >Summary: Development files for %{name}-qt5 >Requires: %{name}-qt5 = %{version}-%{release} >Requires: qtbase5-common-devel > >%description qt5-devel >This package contains libraries and header files for developing applications >that use QtSingleApplication with Qt5. > >%files qt5-devel >%doc doc/html/ examples/ >%{_qt5_libdir}/libQt5*SingleApplication*.so >%dir %{_qt5_headerdir}/QtSolutions/ >%{_qt5_includedir}/QtSolutions/QtSingleApplication >%{_qt5_includedir}/QtSolutions/%{name}.h >%{_qt5_datadir}/mkspecs/features/qtsingleapplication.prf > >%package -n qtsinglecoreapplication-qt5 >Summary: Qt library to start applications only once per user (Qt5) >Requires: qtbase5-common > >%description -n qtsinglecoreapplication-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 qtsinglecoreapplication-qt5 >%license licenses/* ># Caution! Unversioned .so file goes into -devel >%{_qt5_libdir}/libQt5*SingleCoreApplication*.so.* > >%package -n qtsinglecoreapplication-qt5-devel >Summary: Development files for qtsinglecoreapplication-qt5 >Requires: qtsinglecoreapplication-qt5 = %{version}-%{release} >Requires: qtbase5-common-devel > >%description -n qtsinglecoreapplication-qt5-devel >This package contains libraries and header files for developing applications >that use QtSingleCoreApplication. > >%files -n qtsinglecoreapplication-qt5-devel >%{_qt5_libdir}/libQt5*SingleCoreApplication*.so >%dir %{_qt5_includedir}/QtSolutions/ >%{_qt5_includedir}/QtSolutions/QtSingleCoreApplication >%{_qt5_includedir}/QtSolutions/qtsinglecoreapplication.h >%{_qt5_datadir}/mkspecs/features/qtsinglecoreapplication.prf > >#-------------------------------------------------------------------- > >%prep >%setup -q -n %{name}-%{upstreamver}-opensource >%patch0 -p1 >%patch1 -p1 >%patch2 -p1 >%patch3 -p1 > ># (Fedora) We already disabled bundling this extrenal library. ># But just to make sure: >rm src/{QtLocked,qtlocked}* > >mkdir qt5 > ># QTBUG-44595, be careful with renaming of file names! >sed -i -r -e 's,..qtLibraryTarget.Qt(.*).,Qt$${QT_LIBNAME_VERSION}\1,' \ > -e '1s/.*$/greaterThan(QT_MAJOR_VERSION, 4): QT_LIBNAME_VERSION = $${QT_MAJOR_VERSION}\n&/' \ > common.pri >cp -p %{SOURCE1} %{SOURCE2} qt5 >sed -i -r 's,-lQt,\05,' qt5/qtsingleapplication.prf >sed -i -r 's,-lQt,\05,' qt5/qtsinglecoreapplication.prf > ># additional header needed for Qt5.5 >sed -i -r 's,.include,\0 <QtCore/QDataStream>\n\0,' src/qtlocalpeer.h > >%build >touch .licenseAccepted ># Does not use GNU configure >./configure -library >%qmake_qt4 >%make >pushd qt5 >%qmake_qt5 .. >%make >popd > > >%install ># libraries >mkdir -p %{buildroot}%{_qt4_libdir} >cp -a lib/* %{buildroot}%{_qt4_libdir} >chmod 755 %{buildroot}%{_qt4_libdir}/*.so.*.*.* > ># headers >mkdir -p %{buildroot}%{_qt4_includedir}/QtSolutions >cp -a \ > src/qtsingleapplication.h \ > src/QtSingleApplication \ > src/qtsinglecoreapplication.h \ > src/QtSingleCoreApplication \ > %{buildroot}%{_qt4_includedir}/QtSolutions > >mkdir -p %{buildroot}%{_qt4_datadir}/mkspecs/features >cp -a %{SOURCE1} %{SOURCE2} %{buildroot}%{_qt4_datadir}/mkspecs/features/ > >mkdir -p %{buildroot}%{_qt5_includedir} ># symlink is not possible due to split into individual subpackages >cp -ap %{buildroot}%{_qt4_includedir}/QtSolutions %{buildroot}%{_qt5_includedir} > >mkdir -p %{buildroot}%{_qt5_datadir}/mkspecs/features >install -p -m644 qt5/*.prf %{buildroot}%{_qt5_datadir}/mkspecs/features
# Upstream uses weird versioning convention %define upstreamver 2.6_1 %define libname_major 1 %define libname_core_major 1 %define libname %mklibname %name %libname_major %define libname_core %mklibname qtsinglecoreapplication %libname_core_major %define libname_devel %mklibname %name -d %define libname_core_devel %mklibname qtsinglecoreapplication -d Summary: Qt library to start applications only once per user Name: qtsingleapplication Version: %(echo %upstreamver | sed 's!_!.!' ) Release: %mkrel 9 Group: Development/KDE and Qt License: GPLv3 or LGPLv2 with exceptions URL: http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtsingleapplication-%{upstreamver}-opensource.tar.gz # (Fedora) The following source and 2 patches are sent upstream: # http://bugreports.qt.nokia.com/browse/QTSOLBUG-119 # To add qmake support for convenience for packages using this library: Source1: qtsingleapplication.prf Source2: qtsinglecoreapplication.prf # Don't build examples, Include qtsinglecoreapplication library in the build: Patch0: qtsingleapplication-build.diff # (Fedora) The library includes a duplicate of qtlockedfile. We link to it dynamically instead: Patch1: qtsingleapplication-dont-bundle-external-libs.patch # (Fedora) Additional API for building clementine # http://bugreports.qt.nokia.com/browse/QTSOLBUG-133 Patch2: qtsingleapplication-add-api.patch Patch3: qtsingleapplication-gcc47.patch BuildRequires: qt4-devel BuildRequires: qtlockedfile-devel %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. #-------------------------------------------------------------------- %package -n %libname Summary: Qt library to start applications only once per user Group: Development/KDE and Qt %description -n %libname 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. %files -n %libname %{_qt4_libdir}/lib*SingleApplication*.so.%{libname_major}* #-------------------------------------------------------------------- %package -n %libname_devel Summary: Development files for %{name} Group: Development/KDE and Qt Requires: %{libname} = %{version}-%{release} Provides: qtsingleapplication-devel = %{version}-%{release} %description -n %libname_devel This package contains libraries and header files for developing applications that use QtSingleApplication. %files -n %libname_devel %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT %doc doc examples %{_qt4_libdir}/lib*SingleApplication*.so %dir %{_qt4_includedir}/QtSolutions/ %{_qt4_includedir}/QtSolutions/QtSingleApplication %{_qt4_includedir}/QtSolutions/%{name}.h %{_qt4_datadir}/mkspecs/features/%{name}.prf #-------------------------------------------------------------------- %package -n %libname_core Summary: Qt library to start applications only once per user Group: Development/KDE and Qt %description -n %libname_core 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 the library package for QtSingleCoreApplication. %files -n %libname_core %{_qt4_libdir}/lib*SingleCoreApplication*.so.%{libname_core_major}* #-------------------------------------------------------------------- %package -n %libname_core_devel Summary: Development files for qtsinglecoreapplication Group: Development/KDE and Qt Requires: %libname_core = %{version}-%{release} Provides: qtsinglecoreapplication-devel = %{version}-%{release} %description -n %libname_core_devel This package contains libraries and header files for developing applications that use QtSingleCoreApplication. %files -n %libname_core_devel %doc LGPL_EXCEPTION.txt LICENSE.* %{_qt4_libdir}/lib*SingleCoreApplication*.so %dir %{_qt4_includedir}/QtSolutions/ %{_qt4_includedir}/QtSolutions/QtSingleCoreApplication %{_qt4_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt4_datadir}/mkspecs/features/qtsinglecoreapplication.prf %package qt5 Summary: Qt5 library to start applications only once per user BuildRequires: qt5lockedfile-devel Requires: qtbase5-common %description 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. This is a special build against Qt5. %files qt5 %license licenses/* %doc README.TXT # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/libQt5*SingleApplication*.so.* %package qt5-devel Summary: Development files for %{name}-qt5 Requires: %{name}-qt5 = %{version}-%{release} Requires: qtbase5-common-devel %description qt5-devel This package contains libraries and header files for developing applications that use QtSingleApplication with Qt5. %files qt5-devel %doc doc/html/ examples/ %{_qt5_libdir}/libQt5*SingleApplication*.so %dir %{_qt5_headerdir}/QtSolutions/ %{_qt5_includedir}/QtSolutions/QtSingleApplication %{_qt5_includedir}/QtSolutions/%{name}.h %{_qt5_datadir}/mkspecs/features/qtsingleapplication.prf %package -n qtsinglecoreapplication-qt5 Summary: Qt library to start applications only once per user (Qt5) Requires: qtbase5-common %description -n qtsinglecoreapplication-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 qtsinglecoreapplication-qt5 %license licenses/* # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/libQt5*SingleCoreApplication*.so.* %package -n qtsinglecoreapplication-qt5-devel Summary: Development files for qtsinglecoreapplication-qt5 Requires: qtsinglecoreapplication-qt5 = %{version}-%{release} Requires: qtbase5-common-devel %description -n qtsinglecoreapplication-qt5-devel This package contains libraries and header files for developing applications that use QtSingleCoreApplication. %files -n qtsinglecoreapplication-qt5-devel %{_qt5_libdir}/libQt5*SingleCoreApplication*.so %dir %{_qt5_includedir}/QtSolutions/ %{_qt5_includedir}/QtSolutions/QtSingleCoreApplication %{_qt5_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt5_datadir}/mkspecs/features/qtsinglecoreapplication.prf #-------------------------------------------------------------------- %prep %setup -q -n %{name}-%{upstreamver}-opensource %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 # (Fedora) We already disabled bundling this extrenal library. # But just to make sure: rm src/{QtLocked,qtlocked}* mkdir qt5 # QTBUG-44595, be careful with renaming of file names! sed -i -r -e 's,..qtLibraryTarget.Qt(.*).,Qt$${QT_LIBNAME_VERSION}\1,' \ -e '1s/.*$/greaterThan(QT_MAJOR_VERSION, 4): QT_LIBNAME_VERSION = $${QT_MAJOR_VERSION}\n&/' \ common.pri cp -p %{SOURCE1} %{SOURCE2} qt5 sed -i -r 's,-lQt,\05,' qt5/qtsingleapplication.prf sed -i -r 's,-lQt,\05,' qt5/qtsinglecoreapplication.prf # additional header needed for Qt5.5 sed -i -r 's,.include,\0 <QtCore/QDataStream>\n\0,' src/qtlocalpeer.h %build touch .licenseAccepted # Does not use GNU configure ./configure -library %qmake_qt4 %make pushd qt5 %qmake_qt5 .. %make popd %install # libraries mkdir -p %{buildroot}%{_qt4_libdir} cp -a lib/* %{buildroot}%{_qt4_libdir} chmod 755 %{buildroot}%{_qt4_libdir}/*.so.*.*.* # headers mkdir -p %{buildroot}%{_qt4_includedir}/QtSolutions cp -a \ src/qtsingleapplication.h \ src/QtSingleApplication \ src/qtsinglecoreapplication.h \ src/QtSingleCoreApplication \ %{buildroot}%{_qt4_includedir}/QtSolutions mkdir -p %{buildroot}%{_qt4_datadir}/mkspecs/features cp -a %{SOURCE1} %{SOURCE2} %{buildroot}%{_qt4_datadir}/mkspecs/features/ mkdir -p %{buildroot}%{_qt5_includedir} # symlink is not possible due to split into individual subpackages cp -ap %{buildroot}%{_qt4_includedir}/QtSolutions %{buildroot}%{_qt5_includedir} mkdir -p %{buildroot}%{_qt5_datadir}/mkspecs/features install -p -m644 qt5/*.prf %{buildroot}%{_qt5_datadir}/mkspecs/features
View Attachment As Raw
Actions:
View
Attachments on
bug 16523
:
6891
|
7317
|
7318
|
7319