packages libqtlockedfile.spec
      Pages: < 1 >  DOWNLOAD      
%define        pkg_version 2.4_1
Name:          libqtlockedfile
Version:       2.4.1
Release:       1mamba
Summary:       The QtLockedFile class extends QFile with advisory locking functions
Group:         System/Libraries
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtlockedfile
Source0:       http://get.qt.nokia.com/qt/solutions/lgpl/qtlockedfile-%{pkg_version}-opensource.tar.gz
# http://bugreports.qt.nokia.com/browse/QTSOLBUG-119
Source1:       http://bugreports.qt.nokia.com/secure/attachment/14590/qtlockedfile.prf

Patch0:        libqtlockedfile-2.4.1-dont-build-example.patch
Patch1:        libqtlockedfile-2.4.1-dont-link-qtgui.patch
License:       GPL, LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libqt4-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
This class extends the QFile class with inter-process file locking capabilities. If an application requires that several processes should 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.

%package devel
Group:         Development/Libraries
Summary:       Static libraries and headers for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description devel
The QtLockedFile class extends QFile with advisory locking functions.

This package contains static libraries and header files need for development.

%prep

%setup -q -n qtlockedfile-%{pkg_version}-opensource
%patch0 -p1
%patch1 -p1

%build
./configure -library << EOF
yes
EOF
%{_qt4_qmake}
%make

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_qt4_libdir}
cp -a lib/libQtSolutions_LockedFile-*.so* \
	 %{buildroot}%{_qt4_libdir}/
chmod 755 %{buildroot}%{_qt4_libdir}/libQtSolutions_LockedFile-*.so*

mkdir -p %{buildroot}%{_qt4_headerdir}/QtSolutions
install -pm 644 src/qtlockedfile.h \
	 %{buildroot}%{_qt4_headerdir}/QtSolutions/
install -pm 644 src/QtLockedFile \
     %{buildroot}%{_qt4_headerdir}/QtSolutions/

mkdir -p %{buildroot}%{_qt4_datadir}/mkspecs/features
install -pm 644 %{SOURCE1} %{buildroot}%{_qt4_datadir}/mkspecs/features/qtlockedfile.prf

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_qt4_libdir}/libQtSolutions_LockedFile-*.so.*
%doc README.TXT

%files devel
%defattr(-,root,root)
%{_qt4_headerdir}/QtSolutions/QtLockedFile
%{_qt4_headerdir}/QtSolutions/qtlockedfile.h
%{_qt4_libdir}/libQtSolutions_LockedFile-*.so
%{_qt4_datadir}/mkspecs/features/qtlockedfile.prf

%changelog
* Wed Sep 22 2010 gil <puntogil@...> 2.4.1-1mamba
- package created by autospec