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