File libQtAssistantClient4.spec of Package libqtassistant

#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

%define thename libQtAssistantClient
Name:           %{thename}4
Version:        4.6.3
Release:        6 
Summary:        Qt Assistant Compatibility Version
Group:          Development/Libraries/C and C++
License:        LGPL
Url:            http://labs.qt.nokia.com/2010/06/22/qt-assistant-compat-version-available-as-extra-source-package/
Source:         qt-assistant-qassistantclient-library-compat-src-4.6.3.tar.gz
Patch1:         1-dest.patch
Patch2:         2-include.patch
Patch3:         3-header.patch
#Patch4:         4-pkgconfig.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on

%if 0%{?suse_version}
BuildRequires:  libqt4
BuildRequires:  libqt4-devel
%define qmake qmake
%else if 0%{?fedora_version}%{?centos_version}
BuildRequires:  qt-devel
BuildRequires:  gcc-c++
%define qmake qmake-qt4
%endif

%description
The old version of the Qt Assistant has been removed from Qt 4.7.
This package brings it back for those application that still depend on it.

%package devel
Summary:        Qt Assistant Compatibility Version
Group:          Development/Libraries/C and C++
Requires:  %{name} = %{version}

%description devel
The old version of the Qt Assistant has been removed from Qt 4.7.
This package brings it back for those application that still depend on it.


%prep
%setup -q -n qt-assistant-qassistantclient-library-compat-version-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
#%patch4 -p1

%build
%qmake
make 
cd lib
%qmake DESTDIR=$RPM_BUILD_ROOT/%{_libdir}
make

%install
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/QtAssistant/
install -m 0644 lib/*.h $RPM_BUILD_ROOT/%{_includedir}/QtAssistant/
install -m 0644 lib/Q* $RPM_BUILD_ROOT/%{_includedir}/QtAssistant/
cd lib
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT

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

%files
%defattr(-,root,root)
%{_libdir}/%{thename}.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/%{thename}.so
%dir %{_includedir}/QtAssistant
%{_includedir}/QtAssistant/*

%changelog

openSUSE Build Service is sponsored by