]>
Commit | Line | Data |
---|---|---|
5f8c12b9 | 1 | Summary: Qt library to start applications only once per user |
310002d3 | 2 | Name: QtSingleApplication |
5f8c12b9 | 3 | Version: 2.6 |
7023061e | 4 | Release: 5 |
5f8c12b9 ER |
5 | License: GPL v3 or LGPL v2 with exceptions |
6 | Group: Libraries | |
7 | URL: http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication | |
310002d3 | 8 | Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtsingleapplication-%{version}_1-opensource.tar.gz |
5f8c12b9 | 9 | # Source0-md5: 902795eb13ecedbdc112f00d7ec22949 |
310002d3 | 10 | Source1: qtsingleapplication.prf |
099d1b50 | 11 | Source2: qtsinglecoreapplication.prf |
310002d3 ER |
12 | Patch0: qtsingleapplication-build.diff |
13 | Patch1: qtsingleapplication-dont-bundle-external-libs.patch | |
b639dacf | 14 | Patch2: clementine.patch |
30fcf11b | 15 | BuildRequires: QtCore-devel |
16 | BuildRequires: QtGui-devel | |
310002d3 | 17 | BuildRequires: QtLockedFile-devel |
30fcf11b | 18 | BuildRequires: QtNetwork-devel |
19 | BuildRequires: libstdc++-devel | |
5f8c12b9 | 20 | BuildRequires: qt4-build |
310002d3 | 21 | BuildRequires: qt4-qmake |
5f8c12b9 ER |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
310002d3 ER |
24 | %define _qt4_datadir %{_datadir}/qt4 |
25 | ||
5f8c12b9 ER |
26 | %description |
27 | For some applications it is useful or even critical that they are | |
28 | started only once by any user. Future attempts to start the | |
29 | application should activate any already running instance, and possibly | |
30 | perform requested actions, e.g. loading a file, in that instance. | |
31 | ||
32 | The QtSingleApplication class provides an interface to detect a | |
33 | running instance, and to send command strings to that instance. | |
34 | ||
35 | For console (non-GUI) applications, the QtSingleCoreApplication | |
36 | variant is provided, which avoids dependency on QtGui. | |
37 | ||
38 | %package devel | |
310002d3 | 39 | Summary: Development files for QtSingleApplication |
5f8c12b9 ER |
40 | Group: Development/Libraries |
41 | Requires: %{name} = %{version}-%{release} | |
42 | Requires: qt4-build | |
310002d3 | 43 | Requires: qt4-qmake |
5f8c12b9 ER |
44 | |
45 | %description devel | |
46 | This package contains libraries and header files for developing | |
310002d3 | 47 | applications that use QtSingleApplication. |
5f8c12b9 ER |
48 | |
49 | %prep | |
310002d3 | 50 | %setup -q -n qtsingleapplication-%{version}_1-opensource |
5f8c12b9 | 51 | %patch0 -p1 |
310002d3 | 52 | %patch1 -p1 |
b639dacf | 53 | %patch2 -p1 |
310002d3 ER |
54 | |
55 | # We already disabled bundling this extrenal library. | |
56 | # But just to make sure: | |
57 | rm src/{QtLocked,qtlocked}* | |
5f8c12b9 ER |
58 | |
59 | %build | |
60 | touch .licenseAccepted | |
61 | # Does not use GNU configure | |
310002d3 ER |
62 | ./configure \ |
63 | -library | |
64 | ||
65 | # XXX fix QtLockedFile package | |
66 | qmake-qt4 INCLUDEPATH+=%{_includedir}/QtSolutions | |
5f8c12b9 ER |
67 | %{__make} |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | # libraries | |
73 | install -d $RPM_BUILD_ROOT%{_libdir} | |
74 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} | |
75 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
76 | ||
77 | # headers | |
7023061e | 78 | install -d $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions |
5f8c12b9 ER |
79 | cp -a \ |
80 | src/qtsingleapplication.h \ | |
81 | src/QtSingleApplication \ | |
82 | src/qtsinglecoreapplication.h \ | |
83 | src/QtSingleCoreApplication \ | |
7023061e | 84 | $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions |
5f8c12b9 | 85 | |
310002d3 | 86 | install -d $RPM_BUILD_ROOT%{_qt4_datadir}/mkspecs/features |
099d1b50 | 87 | cp -a %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_qt4_datadir}/mkspecs/features |
310002d3 | 88 | |
5f8c12b9 ER |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post -p /sbin/ldconfig | |
93 | %postun -p /sbin/ldconfig | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
5f8c12b9 | 98 | %attr(755,root,root) %{_libdir}/libQtSolutions_SingleApplication-%{version}.so.*.*.* |
310002d3 | 99 | %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_SingleApplication-%{version}.so.1 |
099d1b50 ER |
100 | %attr(755,root,root) %{_libdir}/libQtSolutions_SingleCoreApplication-%{version}.so.*.*.* |
101 | %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_SingleCoreApplication-%{version}.so.1 | |
5f8c12b9 ER |
102 | |
103 | %files devel | |
104 | %defattr(644,root,root,755) | |
105 | %doc doc examples | |
106 | %{_libdir}/libQtSolutions_SingleApplication-%{version}.so | |
099d1b50 | 107 | %{_libdir}/libQtSolutions_SingleCoreApplication-%{version}.so |
310002d3 | 108 | # XXX dir shared dir with QtLockedFile.spec |
7023061e ER |
109 | %dir %{_includedir}/qt4/QtSolutions |
110 | %{_includedir}/qt4/QtSolutions/QtSingleApplication | |
111 | %{_includedir}/qt4/QtSolutions/QtSingleCoreApplication | |
112 | %{_includedir}/qt4/QtSolutions/qtsingleapplication.h | |
113 | %{_includedir}/qt4/QtSolutions/qtsinglecoreapplication.h | |
310002d3 | 114 | %{_qt4_datadir}/mkspecs/features/qtsingleapplication.prf |
099d1b50 | 115 | %{_qt4_datadir}/mkspecs/features/qtsinglecoreapplication.prf |