]>
Commit | Line | Data |
---|---|---|
5f8c12b9 ER |
1 | # TODO |
2 | # - rename as QtSingleApplication ? | |
3 | # - subpackage for non-gui once any package appears needing so (QtSingleCoreApplication) | |
4 | Summary: Qt library to start applications only once per user | |
5 | Name: qtsingleapplication | |
6 | Version: 2.6 | |
7 | Release: 1 | |
8 | License: GPL v3 or LGPL v2 with exceptions | |
9 | Group: Libraries | |
10 | URL: http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication | |
11 | Source0: http://get.qt.nokia.com/qt/solutions/lgpl/%{name}-%{version}_1-opensource.tar.gz | |
12 | # Source0-md5: 902795eb13ecedbdc112f00d7ec22949 | |
13 | Patch0: %{name}-build.diff | |
14 | BuildRequires: qt4-build | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %description | |
18 | For some applications it is useful or even critical that they are | |
19 | started only once by any user. Future attempts to start the | |
20 | application should activate any already running instance, and possibly | |
21 | perform requested actions, e.g. loading a file, in that instance. | |
22 | ||
23 | The QtSingleApplication class provides an interface to detect a | |
24 | running instance, and to send command strings to that instance. | |
25 | ||
26 | For console (non-GUI) applications, the QtSingleCoreApplication | |
27 | variant is provided, which avoids dependency on QtGui. | |
28 | ||
29 | %package devel | |
30 | Summary: Development files for %{name} | |
31 | Group: Development/Libraries | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | Requires: qt4-build | |
34 | ||
35 | %description devel | |
36 | This package contains libraries and header files for developing | |
37 | applications that use QtSingleCoreApplication. | |
38 | ||
39 | %prep | |
40 | %setup -q -n %{name}-%{version}_1-opensource | |
41 | %patch0 -p1 | |
42 | ||
43 | %build | |
44 | touch .licenseAccepted | |
45 | # Does not use GNU configure | |
46 | ./configure -library | |
47 | qmake-qt4 | |
48 | %{__make} | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | # libraries | |
54 | install -d $RPM_BUILD_ROOT%{_libdir} | |
55 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} | |
56 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
57 | ||
58 | # headers | |
59 | install -d $RPM_BUILD_ROOT%{_includedir}/QtSolutions | |
60 | cp -a \ | |
61 | src/qtsingleapplication.h \ | |
62 | src/QtSingleApplication \ | |
63 | src/qtsinglecoreapplication.h \ | |
64 | src/QtSingleCoreApplication \ | |
65 | $RPM_BUILD_ROOT%{_includedir}/QtSolutions | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post -p /sbin/ldconfig | |
71 | %postun -p /sbin/ldconfig | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
76 | %attr(755,root,root) %{_libdir}/libQtSolutions_SingleApplication-%{version}.so.1 | |
77 | %attr(755,root,root) %{_libdir}/libQtSolutions_SingleApplication-%{version}.so.*.*.* | |
78 | ||
79 | %files devel | |
80 | %defattr(644,root,root,755) | |
81 | %doc doc examples | |
82 | %{_libdir}/libQtSolutions_SingleApplication-%{version}.so | |
83 | %{_includedir}/QtSolutions |