]> git.pld-linux.org Git - packages/QtLockedFile.git/blame - QtLockedFile.spec
- pl
[packages/QtLockedFile.git] / QtLockedFile.spec
CommitLineData
0b76b377
ER
1#
2# Conditional build:
3%bcond_without qt4 # build Qt4
4237b724 4%bcond_without qt5 # build Qt5
93c2628d
ER
5
6# last commit to qtlockedfile subdir in
7# https://qt.gitorious.org/qt-solutions/qt-solutions/
8%define commit 17b56547d6e0d9a06603231fe2384474f9144829
3498a0fc 9Summary: QFile extension with advisory locking functions
ad427fbe 10Summary(pl.UTF-8): Rozszerzenie QFile z funkcjami do blokowania doradczego
3498a0fc
ER
11Name: QtLockedFile
12Version: 2.4
ad427fbe 13Release: 4
3498a0fc
ER
14License: GPL v3 or LGPL v2 with exceptions
15Group: Libraries
93c2628d
ER
16# git clone git@gitorious.org:qt-solutions/qt-solutions.git
17# git checkout %{commit}
18# tar -cjf QtLockedFile-%{version}.tar.bz2 -C qt-solutions/qtlockedfile .
19Source0: %{name}-%{version}.tar.bz2
20# Source0-md5: 8d0525b7f3dc92ee1464c6a538832535
3498a0fc
ER
21Source1: qtlockedfile.prf
22Patch0: qtlockedfile-dont-build-example.patch
93c2628d 23Patch1: qtlockedfile-use-current-version.patch
ad427fbe 24Patch2: qtlockedfile-install.patch
93c2628d 25URL: http://doc.qt.digia.com/solutions/4/qtlockedfile/qtlockedfile.html
4237b724 26BuildRequires: libstdc++-devel
0b76b377 27%if %{with qt4}
caba5b65 28BuildRequires: QtCore-devel
caba5b65 29BuildRequires: qt4-qmake
0b76b377
ER
30%endif
31%if %{with qt5}
4237b724 32BuildRequires: Qt5Core-devel
f1a25cde 33BuildRequires: qt5-qmake >= 5.4
0b76b377 34%endif
3498a0fc
ER
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
1d007fa9
ER
37%define qt4dir %{_datadir}/qt4
38%define qt5dir %{_libdir}/qt5
3498a0fc
ER
39
40%description
41This class extends the QFile class with inter-process file locking
42capabilities. If an application requires that several processes should
43access the same file, QtLockedFile can be used to easily ensure that
44only one process at a time is writing to the file, and that no process
45is writing to it while others are reading it.
46
ad427fbe
JB
47%description -l pl.UTF-8
48Ta klasa rozszerza klasę QFile o możliwość międzyprocesowego
49blokowania plików. Jeśli aplikacja wymaga, aby różne procesy miały
50dostęp do tego samego pliku, QtLockedFile może pomóc łatwo zapewnić,
51że tylko jeden proces naraz zapisuje do pliku i żaden proces nie
52zapisuje, kiedy inne go czytają.
53
93c2628d 54%package devel
3498a0fc 55Summary: Development files for QtLockedFile library
ad427fbe 56Summary(pl.UTF-8): Pliki programistyczne biblioteki QtLockedFile
3498a0fc
ER
57Group: Development/Libraries
58Requires: %{name} = %{version}-%{release}
3498a0fc 59
93c2628d 60%description devel
ad427fbe
JB
61This package contains header files for developing applications that
62use QtLockedFile.
63
64%description devel -l pl.UTF-8
65Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
66wykorzystujących QtLockedFile.
3498a0fc 67
4237b724
ER
68%package -n Qt5LockedFile
69Summary: QFile extension with advisory locking functions
ad427fbe 70Summary(pl.UTF-8): Rozszerzenie QFile z funkcjami do blokowania doradczego
4237b724
ER
71Group: Libraries
72
73%description -n Qt5LockedFile
74This class extends the QFile class with inter-process file locking
75capabilities. If an application requires that several processes should
76access the same file, QtLockedFile can be used to easily ensure that
77only one process at a time is writing to the file, and that no process
78is writing to it while others are reading it.
79
ad427fbe
JB
80%description -n Qt5LockedFile -l pl.UTF-8
81Ta klasa rozszerza klasę QFile o możliwość międzyprocesowego
82blokowania plików. Jeśli aplikacja wymaga, aby różne procesy miały
83dostęp do tego samego pliku, QtLockedFile może pomóc łatwo zapewnić,
84że tylko jeden proces naraz zapisuje do pliku i żaden proces nie
85zapisuje, kiedy inne go czytają.
86
4237b724
ER
87%package -n Qt5LockedFile-devel
88Summary: Development files for Qt5LockedFile library
ad427fbe 89Summary(pl.UTF-8): Pliki programistyczne biblioteki QtLockedFile
4237b724
ER
90Group: Development/Libraries
91Requires: Qt5LockedFile = %{version}-%{release}
4237b724
ER
92
93%description -n Qt5LockedFile-devel
94This package contains libraries and header files for developing
95applications that use Qt5LockedFile.
96
ad427fbe
JB
97%description -n Qt5LockedFile-devel -l pl.UTF-8
98Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
99wykorzystujących QtLockedFile.
100
3498a0fc 101%prep
93c2628d 102%setup -qc
3498a0fc 103%patch0 -p1
93c2628d 104%patch1 -p0
ad427fbe 105%patch2 -p1
0b76b377 106
3498a0fc 107%build
3498a0fc
ER
108# Does not use GNU configure
109./configure -library
ad427fbe
JB
110
111%if %{with qt4}
112install -d build-qt4
113cd build-qt4
114qmake-qt4 ../qtlockedfile.pro \
115 QMAKE_CXX="%{__cxx}" \
116 QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
117 QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \
118 INSTALL_LIBDIR=%{_libdir}
3498a0fc 119%{__make}
0b76b377
ER
120cd ..
121%endif
122
123%if %{with qt5}
ad427fbe 124install -d build-qt5
0b76b377 125cd build-qt5
ad427fbe
JB
126qmake-qt5 ../qtlockedfile.pro \
127 QMAKE_CXX="%{__cxx}" \
128 QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
129 QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \
130 INSTALL_LIBDIR=%{_libdir}
0b76b377
ER
131%{__make}
132cd ..
133%endif
3498a0fc
ER
134
135%install
136rm -rf $RPM_BUILD_ROOT
137
0b76b377 138%if %{with qt4}
ad427fbe
JB
139%{__make} -C build-qt4 install \
140 INSTALL_ROOT=$RPM_BUILD_ROOT
141
142install -d $RPM_BUILD_ROOT{%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features}
143%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
1d007fa9
ER
144cp -p src/qtlockedfile.h src/QtLockedFile $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions
145cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features
0b76b377
ER
146%endif
147
148%if %{with qt5}
ad427fbe
JB
149%{__make} -C build-qt5 install \
150 INSTALL_ROOT=$RPM_BUILD_ROOT
151
152install -d $RPM_BUILD_ROOT{%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features}
153%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
4237b724 154cp -p src/qtlockedfile.h src/QtLockedFile $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions
1d007fa9 155cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt5dir}/mkspecs/features
0b76b377 156%endif
3498a0fc
ER
157
158%clean
159rm -rf $RPM_BUILD_ROOT
160
161%post -p /sbin/ldconfig
162%postun -p /sbin/ldconfig
163
83075c20
ER
164%post -n Qt5LockedFile -p /sbin/ldconfig
165%postun -n Qt5LockedFile -p /sbin/ldconfig
166
0b76b377 167%if %{with qt4}
3498a0fc
ER
168%files
169%defattr(644,root,root,755)
93c2628d 170%doc README.TXT
3498a0fc
ER
171%attr(755,root,root) %{_libdir}/libQtSolutions_LockedFile-%{version}.so.*.*.*
172%attr(755,root,root) %ghost %{_libdir}/libQtSolutions_LockedFile-%{version}.so.1
173
174%files devel
175%defattr(644,root,root,755)
176%doc doc example
ad427fbe 177%attr(755,root,root) %{_libdir}/libQtSolutions_LockedFile-%{version}.so
1d007fa9
ER
178# XXX shared dir
179%dir %{_includedir}/qt4/QtSolutions
180%{_includedir}/qt4/QtSolutions/QtLockedFile
181%{_includedir}/qt4/QtSolutions/qtlockedfile.h
182%{qt4dir}/mkspecs/features/qtlockedfile.prf
0b76b377
ER
183%endif
184
185%if %{with qt5}
4237b724 186%files -n Qt5LockedFile
0b76b377
ER
187%defattr(644,root,root,755)
188%doc README.TXT
4237b724
ER
189%attr(755,root,root) %{_libdir}/libQt5Solutions_LockedFile-%{version}.so.*.*.*
190%attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_LockedFile-%{version}.so.1
0b76b377 191
4237b724 192%files -n Qt5LockedFile-devel
0b76b377
ER
193%defattr(644,root,root,755)
194%doc doc example
ad427fbe 195%attr(755,root,root) %{_libdir}/libQt5Solutions_LockedFile-%{version}.so
4237b724
ER
196# XXX shared dir
197%dir %{_includedir}/qt5/QtSolutions
198%{_includedir}/qt5/QtSolutions/QtLockedFile
199%{_includedir}/qt5/QtSolutions/qtlockedfile.h
1d007fa9 200%{qt5dir}/mkspecs/features/qtlockedfile.prf
0b76b377 201%endif
This page took 0.081723 seconds and 4 git commands to generate.