Mageia Bugzilla – Attachment 7318 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 for mga
qtsingleapplication.spec (text/x-rpm-spec), 9.42 KB, created by
Dimitrios Glentadakis
on 2016-01-03 11:18:21 CET
(
hide
)
Description:
Spec file for mga
Filename:
MIME Type:
Creator:
Dimitrios Glentadakis
Created:
2016-01-03 11:18:21 CET
Size:
9.42 KB
patch
obsolete
>%global commit0 ad9bc4600ce769a8b3ad10910803cd555811b70c > >%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: 2.6.1 >Release: 11 >License: GPLv3 or LGPLv2 with exceptions >URL: http://doc.qt.digia.com/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: LICENSE.GPL3 ># Proposed upstream in https://codereview.qt-project.org/#/c/92411/ >Source4: LICENSE.LGPL ># Proposed upstream in https://codereview.qt-project.org/#/c/92411/ >Source5: LGPL_EXCEPTION > ># Proposed upstream in https://codereview.qt-project.org/#/c/92416/ >Patch0: qtsingleapplication-build-qtsinglecoreapplication.patch ># Proposed upstream in https://codereview.qt-project.org/#/c/92415/ >Patch1: qtsingleapplication-remove-included-qtlockedfile.patch > ># Features for unbundling in Qupzilla, https://github.com/QupZilla/qupzilla/issues/1503 >Patch2: qtsingleapplication-qupzilla.patch > >BuildRequires: pkgconfig(QtCore) >BuildRequires: qt4lockedfile-devel >BuildRequires: qtbase5-common-devel >BuildRequires: qt5lockedfile-devel >BuildRequires: pkgconfig(Qt5Network) > >%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 >Requires: qt4-common > >%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. > >For console (non-GUI) applications, the QtSingleCoreApplication variant >is provided, which avoids dependency on QtGui. > >%files -n %libname >%license licenses/* >%doc README.TXT ># Caution! Unversioned .so file goes into -devel >%{_qt4_libdir}/lib*SingleApplication*.so.%{libname_major}* > ># ---------------------------- > >%package -n %libname_devel >Summary: Development files for %{name} >Requires: %{name} = %{version}-%{release} >Requires: pkgconfig(QtCore) >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 doc/html/ examples/ >%{_qt4_libdir}/libQtSolutions_SingleApplication*.so >%dir %{_qt4_includedir}/QtSolutions/ >%{_qt4_includedir}/QtSolutions/QtSingleApplication >%{_qt4_includedir}/QtSolutions/%{name}.h >%{_qt4_datadir}/mkspecs/features/qtsingleapplication.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 >%license licenses/* ># Caution! Unversioned .so file goes into -devel >%{_qt4_libdir}/lib*SingleCoreApplication*.so.%{libname_core_major}* > ># ----------------------------------- > >%package -n %libname_core_devel >Summary: Development files for qtsinglecoreapplication >Requires: qtsinglecoreapplication = %{version}-%{release} >Requires: pkgconfig(QtCore) >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 >%{_qt4_libdir}/lib*QtSolutions_SingleCoreApplication*.so >%dir %{_qt4_includedir}/QtSolutions/ >%{_qt4_includedir}/QtSolutions/QtSingleCoreApplication >%{_qt4_includedir}/QtSolutions/qtsinglecoreapplication.h >%{_qt4_datadir}/mkspecs/features/qtsinglecoreapplication.prf > ># ---------------------- > >%package -n %libname-qt5 >Summary: Qt5 library to start applications only once per user >Requires: qtbase5-common > >%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. > >This is a special build against Qt5. > >%files -n %libname-qt5 >%license licenses/* >%doc README.TXT ># Caution! Unversioned .so file goes into -devel >%{_qt5_libdir}/lib*Qt5*SingleApplication*.so.%{libname_major}* > ># ----------------------------- > >%package -n %libname-qt5-devel >Summary: Development files for %{name}-qt5 >Requires: %{name}-qt5 = %{version}-%{release} >Requires: qt5-devel >Provides: qtsingleapplication-qt5-devel = %{version}-%{release} > >%description -n %libname-qt5-devel >This package contains libraries and header files for developing applications >that use QtSingleApplication with Qt5. > >%files -n %libname-qt5-devel >%doc doc/html/ examples/ >%{_qt5_libdir}/lib*Qt5*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: Qt library to start applications only once per user (Qt5) >Requires: qt5-qtbase > >%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 >%license licenses/* ># Caution! Unversioned .so file goes into -devel >%{_qt5_libdir}/lib*Qt5*SingleCoreApplication*.so.%{libname_core_major}* > ># ------------------------------------------ > >%package -n %libname_core-qt5-devel >Summary: Development files for qtsinglecoreapplication-qt5 >Requires: qtsinglecoreapplication-qt5 = %{version}-%{release} >Requires: qt5-qtbase-devel > >%description -n %libname_core-qt5-devel >This package contains libraries and header files for developing applications >that use QtSingleCoreApplication. > >%files -n %libname_core-qt5-devel >%{_qt5_libdir}/lib*Qt5*SingleCoreApplication*.so >%dir %{_qt5_includedir}/QtSolutions/ >%{_qt5_includedir}/QtSolutions/QtSingleCoreApplication >%{_qt5_includedir}/QtSolutions/qtsinglecoreapplication.h >%{_qt5_libdir}/qt5/mkspecs/features/qtsinglecoreapplication.prf > >%prep >%setup -qnqt-solutions-%{commit0}/%{name} >%patch0 -p0 >%patch1 -p0 >%patch2 -p1 ># use versioned soname >sed -i "s,head,%(echo '%{version}' |sed -r 's,(.*)\..*,\1,'),g" common.pri > >mkdir licenses >cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} 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 > ># additional header needed for Qt5.5 >sed -i -r 's,.include,\0 <QtCore/QDataStream>\n\0,' src/qtlocalpeer.h > > >%build ># Does not use GNU configure >./configure -library >%{qmake_qt4} >%make >pushd qt5 >%{qmake_qt5} .. >%make > >%install ># libraries >mkdir -p %{buildroot}%{_libdir} >cp -a lib/* %{buildroot}%{_libdir} >chmod 755 %{buildroot}%{_libdir}/*.so* > ># headers >mkdir -p %{buildroot}%{_qt4_includedir}/QtSolutions >cp -ap \ > src/qtsingleapplication.h \ > src/QtSingleApplication \ > src/qtsinglecoreapplication.h \ > src/QtSingleCoreApplication \ > %{buildroot}%{_qt4_includedir}/QtSolutions >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}%{_qt4_datadir}/mkspecs/features %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features >install -p -m644 %{SOURCE1} %{SOURCE2} %{buildroot}%{_qt4_datadir}/mkspecs/features >install -p -m644 qt5/*.prf %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features >
%global commit0 ad9bc4600ce769a8b3ad10910803cd555811b70c %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: 2.6.1 Release: 11 License: GPLv3 or LGPLv2 with exceptions URL: http://doc.qt.digia.com/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: LICENSE.GPL3 # Proposed upstream in https://codereview.qt-project.org/#/c/92411/ Source4: LICENSE.LGPL # Proposed upstream in https://codereview.qt-project.org/#/c/92411/ Source5: LGPL_EXCEPTION # Proposed upstream in https://codereview.qt-project.org/#/c/92416/ Patch0: qtsingleapplication-build-qtsinglecoreapplication.patch # Proposed upstream in https://codereview.qt-project.org/#/c/92415/ Patch1: qtsingleapplication-remove-included-qtlockedfile.patch # Features for unbundling in Qupzilla, https://github.com/QupZilla/qupzilla/issues/1503 Patch2: qtsingleapplication-qupzilla.patch BuildRequires: pkgconfig(QtCore) BuildRequires: qt4lockedfile-devel BuildRequires: qtbase5-common-devel BuildRequires: qt5lockedfile-devel BuildRequires: pkgconfig(Qt5Network) %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 Requires: qt4-common %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. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui. %files -n %libname %license licenses/* %doc README.TXT # Caution! Unversioned .so file goes into -devel %{_qt4_libdir}/lib*SingleApplication*.so.%{libname_major}* # ---------------------------- %package -n %libname_devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: pkgconfig(QtCore) 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 doc/html/ examples/ %{_qt4_libdir}/libQtSolutions_SingleApplication*.so %dir %{_qt4_includedir}/QtSolutions/ %{_qt4_includedir}/QtSolutions/QtSingleApplication %{_qt4_includedir}/QtSolutions/%{name}.h %{_qt4_datadir}/mkspecs/features/qtsingleapplication.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 %license licenses/* # Caution! Unversioned .so file goes into -devel %{_qt4_libdir}/lib*SingleCoreApplication*.so.%{libname_core_major}* # ----------------------------------- %package -n %libname_core_devel Summary: Development files for qtsinglecoreapplication Requires: qtsinglecoreapplication = %{version}-%{release} Requires: pkgconfig(QtCore) 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 %{_qt4_libdir}/lib*QtSolutions_SingleCoreApplication*.so %dir %{_qt4_includedir}/QtSolutions/ %{_qt4_includedir}/QtSolutions/QtSingleCoreApplication %{_qt4_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt4_datadir}/mkspecs/features/qtsinglecoreapplication.prf # ---------------------- %package -n %libname-qt5 Summary: Qt5 library to start applications only once per user Requires: qtbase5-common %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. This is a special build against Qt5. %files -n %libname-qt5 %license licenses/* %doc README.TXT # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/lib*Qt5*SingleApplication*.so.%{libname_major}* # ----------------------------- %package -n %libname-qt5-devel Summary: Development files for %{name}-qt5 Requires: %{name}-qt5 = %{version}-%{release} Requires: qt5-devel Provides: qtsingleapplication-qt5-devel = %{version}-%{release} %description -n %libname-qt5-devel This package contains libraries and header files for developing applications that use QtSingleApplication with Qt5. %files -n %libname-qt5-devel %doc doc/html/ examples/ %{_qt5_libdir}/lib*Qt5*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: Qt library to start applications only once per user (Qt5) Requires: qt5-qtbase %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 %license licenses/* # Caution! Unversioned .so file goes into -devel %{_qt5_libdir}/lib*Qt5*SingleCoreApplication*.so.%{libname_core_major}* # ------------------------------------------ %package -n %libname_core-qt5-devel Summary: Development files for qtsinglecoreapplication-qt5 Requires: qtsinglecoreapplication-qt5 = %{version}-%{release} Requires: qt5-qtbase-devel %description -n %libname_core-qt5-devel This package contains libraries and header files for developing applications that use QtSingleCoreApplication. %files -n %libname_core-qt5-devel %{_qt5_libdir}/lib*Qt5*SingleCoreApplication*.so %dir %{_qt5_includedir}/QtSolutions/ %{_qt5_includedir}/QtSolutions/QtSingleCoreApplication %{_qt5_includedir}/QtSolutions/qtsinglecoreapplication.h %{_qt5_libdir}/qt5/mkspecs/features/qtsinglecoreapplication.prf %prep %setup -qnqt-solutions-%{commit0}/%{name} %patch0 -p0 %patch1 -p0 %patch2 -p1 # use versioned soname sed -i "s,head,%(echo '%{version}' |sed -r 's,(.*)\..*,\1,'),g" common.pri mkdir licenses cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} 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 # additional header needed for Qt5.5 sed -i -r 's,.include,\0 <QtCore/QDataStream>\n\0,' src/qtlocalpeer.h %build # Does not use GNU configure ./configure -library %{qmake_qt4} %make pushd qt5 %{qmake_qt5} .. %make %install # libraries mkdir -p %{buildroot}%{_libdir} cp -a lib/* %{buildroot}%{_libdir} chmod 755 %{buildroot}%{_libdir}/*.so* # headers mkdir -p %{buildroot}%{_qt4_includedir}/QtSolutions cp -ap \ src/qtsingleapplication.h \ src/QtSingleApplication \ src/qtsinglecoreapplication.h \ src/QtSingleCoreApplication \ %{buildroot}%{_qt4_includedir}/QtSolutions 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}%{_qt4_datadir}/mkspecs/features %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features install -p -m644 %{SOURCE1} %{SOURCE2} %{buildroot}%{_qt4_datadir}/mkspecs/features install -p -m644 qt5/*.prf %{buildroot}%{_qt5_libdir}/qt5/mkspecs/features
View Attachment As Raw
Actions:
View
Attachments on
bug 16523
:
6891
|
7317
|
7318
|
7319