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