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