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