73a803d
Summary:	QFile extension with advisory locking functions
73a803d
Name:		qtlockedfile
73a803d
Version:	2.4
73a803d
Release:	2%{?dist}
73a803d
Group:		System Environment/Libraries
73a803d
License:	GPLv3 or LGPLv2 with exceptions
73a803d
URL:		http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtlockedfile
73a803d
Source0:	http://get.qt.nokia.com/qt/solutions/lgpl/%{name}-%{version}_1-opensource.tar.gz
73a803d
Source1:	qtlockedfile.prf
73a803d
Patch0:		qtlockedfile-dont-build-example.patch
73a803d
# Remove unnecessary linkage to libQtGui
73a803d
Patch1:		qtlockedfile-dont-link-qtgui.patch
73a803d
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
73a803d
BuildRequires:	qt4-devel
73a803d
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
73a803d
73a803d
%description
73a803d
This class extends the QFile class with inter-process file locking capabilities.
73a803d
If an application requires that several processes should access the same file,
73a803d
QtLockedFile can be used to easily ensure that only one process at a time is
73a803d
writing to the file, and that no process is writing to it while others are
73a803d
reading it.
73a803d
73a803d
%package	devel
73a803d
Summary:	Development files for %{name}
73a803d
Group:		Development/Libraries
73a803d
Requires:	%{name} = %{version}-%{release}
73a803d
Requires:	qt4-devel
73a803d
73a803d
%description	devel
73a803d
This package contains libraries and header files for developing applications
73a803d
that use QtLockedFile.
73a803d
73a803d
%prep
73a803d
%setup -q -n %{name}-%{version}_1-opensource
73a803d
%patch0 -p1 -b .no-example
73a803d
%patch1 -p1 -b .dont-link-qtgui
73a803d
73a803d
73a803d
%build
73a803d
touch .licenseAccepted
73a803d
# Does not use GNU configure
73a803d
./configure -library
73a803d
%{_qt4_qmake}
73a803d
make %{?_smp_mflags}
73a803d
73a803d
%install
73a803d
rm -rf $RPM_BUILD_ROOT
73a803d
73a803d
# libraries
73a803d
mkdir -p $RPM_BUILD_ROOT%{_libdir}
73a803d
cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
73a803d
73a803d
# headers
73a803d
mkdir -p $RPM_BUILD_ROOT%{_includedir}/QtSolutions
73a803d
cp -a \
73a803d
    src/qtlockedfile.h \
73a803d
    src/QtLockedFile \
73a803d
    $RPM_BUILD_ROOT%{_includedir}/QtSolutions
73a803d
73a803d
mkdir -p $RPM_BUILD_ROOT%{_qt4_datadir}/mkspecs/features
73a803d
cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_qt4_datadir}/mkspecs/features/
73a803d
73a803d
%clean
73a803d
rm -rf $RPM_BUILD_ROOT
73a803d
73a803d
%post -p /sbin/ldconfig
73a803d
73a803d
%postun -p /sbin/ldconfig
73a803d
73a803d
73a803d
%files
73a803d
%defattr(-,root,root,-)
73a803d
%doc LGPL_EXCEPTION.txt LICENSE.* README.TXT
73a803d
%{_qt4_libdir}/lib*.so.*
73a803d
73a803d
%files devel
73a803d
%defattr(-,root,root,-)
73a803d
%doc doc example
73a803d
%{_qt4_libdir}/lib*.so
73a803d
%{_qt4_headerdir}/QtSolutions/
73a803d
%{_qt4_datadir}/mkspecs/features/%{name}.prf
73a803d
73a803d
%changelog
73a803d
* Fri Apr 16 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> 2.4-2
73a803d
- Remove unnecessary linkage to libQtGui
73a803d
73a803d
* Thu Apr 15 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> 2.4-1
73a803d
- Initial Fedora package.