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