]> git.pld-linux.org Git - packages/QtSingleApplication.git/blame - QtSingleApplication.spec
typos
[packages/QtSingleApplication.git] / QtSingleApplication.spec
CommitLineData
97b6f035
ER
1#
2# Conditional build:
98529ade 3%bcond_without qt4 # build Qt4
97b6f035
ER
4%bcond_without qt5 # build Qt5
5
5c92ed78
ER
6# last commit to qtsingleapplication subdir in
7# https://qt.gitorious.org/qt-solutions/qt-solutions/
8%define commit 841982ceec9d30a7ab7324979a0fd5c9c36fd121
5f8c12b9 9Summary: Qt library to start applications only once per user
310002d3 10Name: QtSingleApplication
5c92ed78 11Version: 2.6.1
c54a9d69 12Release: 2
5f8c12b9
ER
13License: GPL v3 or LGPL v2 with exceptions
14Group: Libraries
5c92ed78
ER
15# git clone git@gitorious.org:qt-solutions/qt-solutions.git
16# git checkout %{commit}
17# tar -cjf QtSingleApplication-%{version}.tar.bz2 -C qt-solutions/qtsingleapplication .
18Source0: %{name}-%{version}.tar.bz2
19# Source0-md5: 2442ba5536b99b4b9144bd33ea23cb17
310002d3 20Source1: qtsingleapplication.prf
099d1b50 21Source2: qtsinglecoreapplication.prf
310002d3 22Patch0: qtsingleapplication-build.diff
5c92ed78 23Patch1: qtlockedfile.patch
b639dacf 24Patch2: clementine.patch
5c92ed78 25URL: http://doc.qt.digia.com/solutions/4/qtsingleapplication/qtsingleapplication.html
98529ade 26BuildRequires: libstdc++-devel
97b6f035 27%if %{with qt4}
30fcf11b 28BuildRequires: QtGui-devel
310002d3 29BuildRequires: QtLockedFile-devel
30fcf11b 30BuildRequires: QtNetwork-devel
5f8c12b9 31BuildRequires: qt4-build
310002d3 32BuildRequires: qt4-qmake
97b6f035
ER
33%endif
34%if %{with qt5}
35BuildRequires: Qt5Core-devel
36BuildRequires: Qt5Gui-devel
37BuildRequires: Qt5LockedFile-devel
38BuildRequires: Qt5Network-devel
39BuildRequires: Qt5Widgets-devel
40BuildRequires: qt5-build
c54a9d69 41BuildRequires: qt5-qmake >= 5.4
97b6f035 42%endif
5f8c12b9
ER
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
dfdbbb18 45%define qt4dir %{_datadir}/qt4
97b6f035 46%define qt5dir %{_libdir}/qt5
310002d3 47
5f8c12b9
ER
48%description
49For some applications it is useful or even critical that they are
50started only once by any user. Future attempts to start the
51application should activate any already running instance, and possibly
52perform requested actions, e.g. loading a file, in that instance.
53
54The QtSingleApplication class provides an interface to detect a
55running instance, and to send command strings to that instance.
56
57For console (non-GUI) applications, the QtSingleCoreApplication
58variant is provided, which avoids dependency on QtGui.
59
5c92ed78 60%package devel
310002d3 61Summary: Development files for QtSingleApplication
5f8c12b9
ER
62Group: Development/Libraries
63Requires: %{name} = %{version}-%{release}
5f8c12b9 64
5c92ed78 65%description devel
5f8c12b9 66This package contains libraries and header files for developing
310002d3 67applications that use QtSingleApplication.
5f8c12b9 68
97b6f035
ER
69%package -n Qt5SingleApplication
70Summary: Qt library to start applications only once per user
71Group: Libraries
72
73%description -n Qt5SingleApplication
74For some applications it is useful or even critical that they are
75started only once by any user. Future attempts to start the
76application should activate any already running instance, and possibly
77perform requested actions, e.g. loading a file, in that instance.
78
79The QtSingleApplication class provides an interface to detect a
80running instance, and to send command strings to that instance.
81
82For console (non-GUI) applications, the QtSingleCoreApplication
83variant is provided, which avoids dependency on QtGui.
84
85%package -n Qt5SingleApplication-devel
86Summary: Development files for Qt5SingleApplication library
87Group: Development/Libraries
88Requires: Qt5SingleApplication = %{version}-%{release}
97b6f035
ER
89
90%description -n Qt5SingleApplication-devel
91This package contains libraries and header files for developing
c64ddd18 92applications that use Qt5SingleApplication.
97b6f035 93
5f8c12b9 94%prep
5c92ed78
ER
95%setup -qc
96%patch0 -p0
97%patch1 -p0
3e0bb370 98%patch2 -p1
310002d3 99
c64ddd18 100# We already disabled bundling this external library.
310002d3
ER
101# But just to make sure:
102rm src/{QtLocked,qtlocked}*
5f8c12b9 103
97b6f035
ER
104set -- *
105install -d build-qt{4,5}
106cp -al "$@" build-qt4
107cp -al "$@" build-qt5
108
5f8c12b9 109%build
97b6f035
ER
110%if %{with qt4}
111cd build-qt4
5f8c12b9 112# Does not use GNU configure
97b6f035 113./configure -library
dfdbbb18 114qmake-qt4
5f8c12b9 115%{__make}
97b6f035
ER
116cd ..
117%endif
118
119%if %{with qt5}
120cd build-qt5
121./configure -library
122# XXX fix QtLockedFile package?
123qmake-qt5 INCLUDEPATH+=%{_includedir}/qt5/QtSolutions
124%{__make}
125cd ..
126%endif
5f8c12b9
ER
127
128%install
129rm -rf $RPM_BUILD_ROOT
97b6f035
ER
130%if %{with qt4}
131cd build-qt4
dfdbbb18 132install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features}
5f8c12b9
ER
133cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
134rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0
dfdbbb18
ER
135cp -p src/qtsingle*application.h src/QtSingle*Application $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions
136cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features
98529ade 137cd ..
97b6f035
ER
138%endif
139
140%if %{with qt5}
141cd build-qt5
142install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features}
143cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
144rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0
145cp -p src/qtsingle*application.h src/QtSingle*Application $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions
146cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{qt5dir}/mkspecs/features
98529ade 147cd ..
97b6f035 148%endif
310002d3 149
5f8c12b9
ER
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%post -p /sbin/ldconfig
154%postun -p /sbin/ldconfig
155
97b6f035
ER
156%post -n Qt5SingleApplication -p /sbin/ldconfig
157%postun -n Qt5SingleApplication -p /sbin/ldconfig
158
159%if %{with qt4}
5f8c12b9
ER
160%files
161%defattr(644,root,root,755)
5c92ed78 162%doc README.TXT
5c92ed78
ER
163%attr(755,root,root) %{_libdir}/libQtSolutions_SingleApplication-2.6.so.*.*.*
164%attr(755,root,root) %ghost %{_libdir}/libQtSolutions_SingleApplication-2.6.so.1
165%attr(755,root,root) %{_libdir}/libQtSolutions_SingleCoreApplication-2.6.so.*.*.*
166%attr(755,root,root) %ghost %{_libdir}/libQtSolutions_SingleCoreApplication-2.6.so.1
5f8c12b9
ER
167
168%files devel
169%defattr(644,root,root,755)
170%doc doc examples
5c92ed78
ER
171%{_libdir}/libQtSolutions_SingleApplication-2.6.so
172%{_libdir}/libQtSolutions_SingleCoreApplication-2.6.so
7023061e
ER
173%{_includedir}/qt4/QtSolutions/QtSingleApplication
174%{_includedir}/qt4/QtSolutions/QtSingleCoreApplication
175%{_includedir}/qt4/QtSolutions/qtsingleapplication.h
176%{_includedir}/qt4/QtSolutions/qtsinglecoreapplication.h
dfdbbb18
ER
177%{qt4dir}/mkspecs/features/qtsingleapplication.prf
178%{qt4dir}/mkspecs/features/qtsinglecoreapplication.prf
97b6f035
ER
179%endif
180
181%if %{with qt5}
182%files -n Qt5SingleApplication
183%defattr(644,root,root,755)
184%doc README.TXT
185%attr(755,root,root) %{_libdir}/libQt5Solutions_SingleApplication-2.6.so.*.*.*
186%attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_SingleApplication-2.6.so.1
187%attr(755,root,root) %{_libdir}/libQt5Solutions_SingleCoreApplication-2.6.so.*.*.*
188%attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_SingleCoreApplication-2.6.so.1
189
190%files -n Qt5SingleApplication-devel
191%defattr(644,root,root,755)
192%doc doc examples
193%{_libdir}/libQt5Solutions_SingleApplication-2.6.so
194%{_libdir}/libQt5Solutions_SingleCoreApplication-2.6.so
195%{_includedir}/qt5/QtSolutions/QtSingleApplication
196%{_includedir}/qt5/QtSolutions/QtSingleCoreApplication
197%{_includedir}/qt5/QtSolutions/qtsingleapplication.h
198%{_includedir}/qt5/QtSolutions/qtsinglecoreapplication.h
199%{qt5dir}/mkspecs/features/qtsingleapplication.prf
200%{qt5dir}/mkspecs/features/qtsinglecoreapplication.prf
201%endif
This page took 0.052659 seconds and 4 git commands to generate.