]> git.pld-linux.org Git - packages/QtLockedFile.git/blobdiff - QtLockedFile.spec
- adjusted qtlockedfile.prf for qt5 compatibility; release 5
[packages/QtLockedFile.git] / QtLockedFile.spec
index 3b1338df47ad54b738bc4ec2d153a89cc3e788f7..3260ebdbfbfdf8ff0b79e4c72b5524618642a483 100644 (file)
@@ -7,9 +7,10 @@
 # https://qt.gitorious.org/qt-solutions/qt-solutions/
 %define        commit  17b56547d6e0d9a06603231fe2384474f9144829
 Summary:       QFile extension with advisory locking functions
+Summary(pl.UTF-8):     Rozszerzenie QFile z funkcjami do blokowania doradczego
 Name:          QtLockedFile
 Version:       2.4
-Release:       2
+Release:       5
 License:       GPL v3 or LGPL v2 with exceptions
 Group:         Libraries
 # git clone git@gitorious.org:qt-solutions/qt-solutions.git
@@ -20,20 +21,21 @@ Source0:    %{name}-%{version}.tar.bz2
 Source1:       qtlockedfile.prf
 Patch0:                qtlockedfile-dont-build-example.patch
 Patch1:                qtlockedfile-use-current-version.patch
+Patch2:                qtlockedfile-install.patch
 URL:           http://doc.qt.digia.com/solutions/4/qtlockedfile/qtlockedfile.html
 BuildRequires: libstdc++-devel
 %if %{with qt4}
-BuildRequires: QtCore-devel
-BuildRequires: qt4-qmake
+BuildRequires: QtCore-devel >= 4
+BuildRequires: qt4-qmake >= 4
 %endif
 %if %{with qt5}
-BuildRequires: Qt5Core-devel
-BuildRequires: qt5-qmake
+BuildRequires: Qt5Core-devel >= 5.4
+BuildRequires: qt5-qmake >= 5.4
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _qt4_datadir    %{_datadir}/qt4
-%define                _qt5_datadir    %{_datadir}/qt5
+%define                qt4dir  %{_datadir}/qt4
+%define                qt5dir  %{_libdir}/qt5
 
 %description
 This class extends the QFile class with inter-process file locking
@@ -42,19 +44,31 @@ access the same file, QtLockedFile can be used to easily ensure that
 only one process at a time is writing to the file, and that no process
 is writing to it while others are reading it.
 
+%description -l pl.UTF-8
+Ta klasa rozszerza klasę QFile o możliwość międzyprocesowego
+blokowania plików. Jeśli aplikacja wymaga, aby różne procesy miały
+dostęp do tego samego pliku, QtLockedFile może pomóc łatwo zapewnić,
+że tylko jeden proces naraz zapisuje do pliku i żaden proces nie
+zapisuje, kiedy inne go czytają.
+
 %package devel
 Summary:       Development files for QtLockedFile library
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki QtLockedFile
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      qt4-build
-Requires:      qt4-qmake
+Requires:      QtCore-devel >= 4
 
 %description devel
-This package contains libraries and header files for developing
-applications that use QtLockedFile.
+This package contains header files for developing applications that
+use QtLockedFile.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
+wykorzystujących QtLockedFile.
 
 %package -n Qt5LockedFile
 Summary:       QFile extension with advisory locking functions
+Summary(pl.UTF-8):     Rozszerzenie QFile z funkcjami do blokowania doradczego
 Group:         Libraries
 
 %description -n Qt5LockedFile
@@ -64,43 +78,58 @@ access the same file, QtLockedFile can be used to easily ensure that
 only one process at a time is writing to the file, and that no process
 is writing to it while others are reading it.
 
+%description -n Qt5LockedFile -l pl.UTF-8
+Ta klasa rozszerza klasę QFile o możliwość międzyprocesowego
+blokowania plików. Jeśli aplikacja wymaga, aby różne procesy miały
+dostęp do tego samego pliku, QtLockedFile może pomóc łatwo zapewnić,
+że tylko jeden proces naraz zapisuje do pliku i żaden proces nie
+zapisuje, kiedy inne go czytają.
+
 %package -n Qt5LockedFile-devel
 Summary:       Development files for Qt5LockedFile library
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki QtLockedFile
 Group:         Development/Libraries
+Requires:      Qt5Core-devel >= 5
 Requires:      Qt5LockedFile = %{version}-%{release}
-Requires:      qt5-build
-Requires:      qt5-qmake
 
 %description -n Qt5LockedFile-devel
 This package contains libraries and header files for developing
 applications that use Qt5LockedFile.
 
+%description -n Qt5LockedFile-devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
+wykorzystujących QtLockedFile.
+
 %prep
 %setup -qc
 %patch0 -p1
 %patch1 -p0
-
-set -- *
-install -d build-qt{4,5}
-cp -al "$@" build-qt4
-cp -al "$@" build-qt5
-
-%{__sed} -i -e 's/QtSolutions/Qt5Solutions/' build-qt5/common.pri
+%patch2 -p1
 
 %build
-%if %{with qt4}
-cd build-qt4
 # Does not use GNU configure
 ./configure -library
-qmake-qt4
+
+%if %{with qt4}
+install -d build-qt4
+cd build-qt4
+qmake-qt4 ../qtlockedfile.pro \
+       QMAKE_CXX="%{__cxx}" \
+       QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+       QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \
+       INSTALL_LIBDIR=%{_libdir}
 %{__make}
 cd ..
 %endif
 
 %if %{with qt5}
+install -d build-qt5
 cd build-qt5
-./configure -library
-qmake-qt5
+qmake-qt5 ../qtlockedfile.pro \
+       QMAKE_CXX="%{__cxx}" \
+       QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+       QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \
+       INSTALL_LIBDIR=%{_libdir}
 %{__make}
 cd ..
 %endif
@@ -109,24 +138,24 @@ cd ..
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with qt4}
-cd build-qt4
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_qt4_datadir}/mkspecs/features}
-cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
-rm $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
-install -d $RPM_BUILD_ROOT%{_includedir}/QtSolutions
-cp -p src/qtlockedfile.h src/QtLockedFile $RPM_BUILD_ROOT%{_includedir}/QtSolutions
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_qt4_datadir}/mkspecs/features
-cd ..
+%{__make} -C build-qt4 install \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT{%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
+cp -p src/qtlockedfile.h src/QtLockedFile $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features
 %endif
 
 %if %{with qt5}
-cd build-qt5
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt5/QtSolutions,%{_qt5_datadir}/mkspecs/features}
-cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
-rm $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
+%{__make} -C build-qt5 install \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT{%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*-%{version}.so.1.0
 cp -p src/qtlockedfile.h src/QtLockedFile $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_qt5_datadir}/mkspecs/features
-cd ..
+%{__sed} -e 's/-lQtSolutions/-lQt5Solutions/' \
+        -e 's/QMAKE_INCDIR_QT/QT_MODULE_INCLUDE_BASE/' %{SOURCE1} >$RPM_BUILD_ROOT%{qt5dir}/mkspecs/features/qtlockedfile.prf
 %endif
 
 %clean
@@ -135,23 +164,25 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%post  -n Qt5LockedFile -p /sbin/ldconfig
+%postun        -n Qt5LockedFile -p /sbin/ldconfig
+
 %if %{with qt4}
 %files
 %defattr(644,root,root,755)
 %doc README.TXT
-#%doc LGPL_EXCEPTION.txt LICENSE.*
 %attr(755,root,root) %{_libdir}/libQtSolutions_LockedFile-%{version}.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_LockedFile-%{version}.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc example
-%{_libdir}/libQtSolutions_LockedFile-%{version}.so
-# XXX shared dir with QtSingleApplication
-%dir %{_includedir}/QtSolutions
-%{_includedir}/QtSolutions/QtLockedFile
-%{_includedir}/QtSolutions/qtlockedfile.h
-%{_qt4_datadir}/mkspecs/features/qtlockedfile.prf
+%attr(755,root,root) %{_libdir}/libQtSolutions_LockedFile-%{version}.so
+# XXX shared dir
+%dir %{_includedir}/qt4/QtSolutions
+%{_includedir}/qt4/QtSolutions/QtLockedFile
+%{_includedir}/qt4/QtSolutions/qtlockedfile.h
+%{qt4dir}/mkspecs/features/qtlockedfile.prf
 %endif
 
 %if %{with qt5}
@@ -164,10 +195,10 @@ rm -rf $RPM_BUILD_ROOT
 %files -n Qt5LockedFile-devel
 %defattr(644,root,root,755)
 %doc doc example
-%{_libdir}/libQt5Solutions_LockedFile-%{version}.so
+%attr(755,root,root) %{_libdir}/libQt5Solutions_LockedFile-%{version}.so
 # XXX shared dir
 %dir %{_includedir}/qt5/QtSolutions
 %{_includedir}/qt5/QtSolutions/QtLockedFile
 %{_includedir}/qt5/QtSolutions/qtlockedfile.h
-%{_qt5_datadir}/mkspecs/features/qtlockedfile.prf
+%{qt5dir}/mkspecs/features/qtlockedfile.prf
 %endif
This page took 0.030491 seconds and 4 git commands to generate.